Editing
AJAX Dialog Forms
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Form Markup Requirements== Create separate PHP include file containing the markup for the <code>FORM</code> element that will be inserted into the dialog. ===FORM element=== Has no parent <code>DIV</code> element. <code>id="dialog-edit-form"</code> <syntaxhighlight lang="html4strict"> <form id="dialog-edit-form"> </form> </syntaxhighlight> Contains hidden input storing action property, and optionally record id and content type id. <syntaxhighlight lang="html4strict"> <input type="hidden" name="<?=P_COMMIT?>" value="1" /> <input type="hidden" name="<?=$input->id->param?>" value="<?=$input->id->value?>" /> <input type="hidden" name="<?=$input->site_section->id->param?>" value="<?=$input->site_section->id->value?>" /> </syntaxhighlight> Submit buttons. JavaScript handlers will be assigned to the buttons after the <code>FORM</code> element has been added to the DOM. * <code>data-tid</code> attribute stores the content type value if it's needed by the JavaScript callback for the button. * <code>data-op</code> attribute stores the operation when using <code>LITTLED.dialogEdit()</code> or a similar callback for the button. <syntaxhighlight lang="html4strict" enclose="div"> <div class="submit-container"> <button class="dlg-commit-btn" data-tid="<?=$input->site_section->id->value?>" data-op="delete">delete</button> <button class="dlg-cancel-btn">cancel</button> </div> </syntaxhighlight>
Summary:
Please note that all contributions to Littledamien Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Littledamien Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information