Add a link to edit the current element inline. |
|
| see cancel, each, form, publish, unknown | |
If there exists a form in the current list context or block, the form is used for editing. Otherwise, the form is built from the attributes being shown in the ‘each’ method or in the ‘block’.
edit without a form
<ul do='notes'> <li do='each'> <r:link/> <r:edit>change name</r:edit> </li> </ul>
If you only need to edit a single attribute, like in the first example above it is easier to use the “edit=’true’” syntax of the show method.
edit with a form
<div do='block'> <p class='edit' do='edit'/> <p class='husband' do='husband.title'/> <p do='form'> <label>Select your husband</label> <r:select name='husband_id' nodes='guys where nice = "true" in site'/> <p><r:cancel t='no way!'/><r:input type='submit'/></p> </p> </div>
You can use the “cancel” tag inside a “form” to show the “cancel” link.