Closed wimogas closed 12 years ago
This was previously only possible with list options such as radios, checkboxes or select dropdowns but I just updated the code to add a new option value
where you can set the value of any field. It works like this:
$myform.addFields({ name: 'number', label: 'Number', type: 'text', value: '100' })
In case you want to set the value of an item in the list
option, separate the item from the value with a colon :
. This feature was already available:
$myform.addFields({
name: 'list',
label: 'List',
type: 'radio',
list: [ 'lorem:one', 'ipsum:two', 'dolor:three' ] // item:value
})
Thanks! You rock man!
I'll buy you a virtual coffee as soon as possible ;)
Quick question,
How do you configure a value tag inside the addFields function? Or you can't?
Thanks!