You can use FormSet to set a textField value, but it doesn't work for radio buttons or checkboxes.

For example, this code...

[{FormOpen form='FormTestRadioButton'}]
[{FormSet form='FormTestRadioButton' textfieldRB='OK' rb='2'}]

[{FormInput type='text' name='textfieldRB' }]\\
[{FormInput type='radio' name='rb' value='1'}] Value 1\\
[{FormInput type='radio' name='rb' value='2'}] Value 2\\
[{FormInput type='radio' name='rb' value='3'}] Value 3

[{FormClose}]
...produces this form:


Value 1
Value 2
Value 3

(The Value 2 is not checked)

Now an example with check boxes.

This code...

[{FormOpen form='FormTestCheckBox'}]
[{FormSet form='FormTestCheckBox' textfieldCB='OK too' cb2='checked'}]
[{FormInput type='text' name='textfieldCB' }]\\

[{FormInput type='checkbox' name='cb1' value='1'}] Value 1\\
[{FormInput type='checkbox' name='cb2' value='2'}] Value 2

[{FormClose}]

...produces this form:


Value 1
Value 2

(Value 2 is not checked)


Any solution will be welcome

-MRA 12 Oct 2008


This should work:

[{FormOpen form='FormTestCheckBox'}]
[{FormSet form='FormTestCheckBox' textfieldCB='OK too'}]
[{FormInput type='text' name='textfieldCB' }]\\

[{FormInput type='checkbox' name='cb1' value='1'}] Value 1\\
[{FormInput type='checkbox' name='cb2' value='2' checked=true}] Value 2

[{FormClose}]

-- JanneJalkanen


No, no, I mean by using just the FormSet, as it is done for the textfield. :-)

--MRA

Add new attachment

In order to upload a new attachment to this page, please use the following box to find the file, then click on “Upload”.
« This page (revision-6) was last changed on 20-Oct-2008 01:14 by MRA