10389 Posts in 2200 Topics by 1712 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1390 Views |
-
Set default selected value in a radio field in User Forms

7 April 2010 at 1:28am Last edited: 7 April 2010 1:29am
Hi all:
I´m using User Forms (SS 2.4 RC1, userforms-trunk-r101443).
I created a form in admin panel.
Now I create a radio field with three options. I want that the third option is checked by default.
In another project, In version 2.1, I did the same thing and it was so easy: when you were creating the options, you could indicate whether or not it was the default. But now there is not a way to do it.So the question is: how can I set the default selected value in a radio field?
Thanks in advance.
-
Re: Set default selected value in a radio field in User Forms

7 April 2010 at 12:11pm
Currently no way of doing it. However it is on my development todo list for the module. Not just for radio buttons but to add the checked functionality to checkboxes and dropdowns etc.
Will be on my todo list http://open.silverstripe.org/ticket/5058 for 0.3
-
Re: Set default selected value in a radio field in User Forms

7 April 2010 at 7:45pm Last edited: 8 April 2010 3:59am
Hi Willr:
And there is no way to set it by code? Can I do something like...
class MyContactForm_Controller extends UserDefinedForm_Controller {
function Form()
{
$form = parent::Form();
// Do something to select a value in radio field
return $form;
}
}
Thanks in advance. -
Re: Set default selected value in a radio field in User Forms

29 February 2012 at 10:54am
Hi Willr,
Was reading this post by Nomen while searching the forum to see the best way to add default text to a text field in your userform module. What do you think would be the best way to go about this?
Thank you,
| 1390 Views | ||
|
Page:
1
|
Go to Top |



