Insert a link to add elements to the current list. |
|
| see add_btn, each, form, publish | |
<ul do='notes' limit='5' id='test'> <li do='add' after='self' done='focus' focus='v_title'/> <li do='each' do='link'/> <li do='form' klass='Post'><input type='text' name='v_title'/></li> </ul> |
In the example above, the “add” method will insert a button at the top of the list to toggle the form and let the user insert elements if he/she has write access to the current node.
The “before” and “after” parameters tell ajax where to insert the newly created node.
The “done” parameter tells to set entry focus in the ‘v_title’ field after a new object has been created (default hides form).
You can leave “focus” empty and the first input field in the form will be used as default.