input

An article by Gaspard Bucher

display an input field

  1. action
  2. ajax
  3. API
  4. classes
  5. common attributes
  6. conditions
  7. context
  8. dates
  9. display
  10. forms
    1. captcha
    2. checkbox
    3. form
    4. input
    5. new
    6. radio
    7. select
    8. textarea
  11. i18n
  12. meta
  13. SQLiss
  14. urls

display an input field

  • label (true, false, t, dyn str) prefix with a label field.
  • type (date,id,...)
  • name attribute name
  • time show time entry (date type)
  • blank (used for checkbox)
  • value input field value
see form, Improved tags, label, select

id

When you need to create links or set a parent id, you can use the “id” type. This shows a text field and uses Ajax to find the node from a pseudo id (a number or a string to find the object):

<r:input type='id' name='icon'/>

date

When inputing a date parameter, Zena shows a javascript calendar box. You can use the “time” parameter to disable time values.

<r:input name='log_at' type='date' time='false'/>

param

This will be removed: use <input> instead of <r:input> for this purpose.

You can use “param” instead of “name” if you need to pass parameters that are not related to the node:

<r:input param='c' value='#{params[:c]}'/>

checkbox

When you display a checkbox, Zena inserts a hidden field with the value to send when the box is not checked:

<input type='hidden' name='node[tagged][foo]' value=''/>

In some situations, you might need to use something other then ”” blank when the checkbox is not checked:

<r:input type='checkbox' name='status' value='100' blank='50'/>