1792 Posts in 588 Topics by 560 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1445 Views |
-
dropDownField in Userforms does not work (OptionsetFieldSet OK)

23 December 2009 at 8:41am
I am trying to use a DropdownField in a userform but it does not seem to work (Silverstripe 2.3.3).
What I did was :1) reuse the code used in the tutorial-3 on forms:
new OptionsetField('Browser', 'Your Favourite Browser', array(
'Firefox' => 'Firefox',
'Internet Explorer' => 'Internet Explorer',
'Safari' => 'Safari',
'Opera' => 'Opera',
'Lynx' => 'Lynx'
))thsi works fine. I can enter the form , send it and receive the notification.
2) but if I *just* change "OptionsetField" with "DropdownField" :
new DropdownField('Browser', 'Your Favourite Browser', array(
'Firefox' => 'Firefox',
'Internet Explorer' => 'Internet Explorer',
'Safari' => 'Safari',
'Opera' => 'Opera',
'Lynx' => 'Lynx'
))I can see the form , choose an option from the DropDownMenu but when I click on "Send" nothing happens and there is no
message in the error log.Any ideas??
Thanks -
Re: dropDownField in Userforms does not work (OptionsetFieldSet OK)

23 December 2009 at 9:22am
You are probably running into this issue - http://open.silverstripe.org/ticket/4586 which was fixed recently. Download the latest release and try that out.
If you are running 2.3 - http://open.silverstripe.com/changeset/latest/modules/userforms/branches/0.2?old_path=/&filename=/userforms/&format=zip
If you are running 2.4 - http://open.silverstripe.com/changeset/latest/modules/userforms/trunk?old_path=/&filename=/userforms/&format=zip
-
Re: dropDownField in Userforms does not work (OptionsetFieldSet OK)

23 December 2009 at 9:30am Last edited: 23 December 2009 9:41am
Thanks Willr for the very prompt reply. I do appreciate.
I will install the patch right awayCheers!
Edit: Patch installed on 2.3.3 It works great! Thanks a lot
-
Re: dropDownField in Userforms does not work (OptionsetFieldSet OK)

23 December 2009 at 9:35am
Sorry just rereading your thread - you said userforms but I don't think you're using userforms at all? With userforms you don't need to write any PHP code. If you are having issues with a form you wrote in PHP then its unlikely userforms has anything to do with it.
Post your custom code and we might be able to help out with that.
-
Re: dropDownField in Userforms does not work (OptionsetFieldSet OK)

28 December 2009 at 4:56pm
Hi Willr,
Actually I am re-using the code documented by Aram from ssBits in his tutorial (http://www.ssbits.com/creating-a-simple-contact-form/). . The reason is that my customer wants an email notification and a pop-up window and I was not able to do it using
"Userforms" out of the box. The php code creates a new Fieldset and "FormAction" ...Isn't this part of the userform module?The strange thing is that the patch you gave me (above in this thread) resolve the problem of the dropDownField and besides
this, the code only works if the userform module is installed .
Thanks - Lise -
Re: dropDownField in Userforms does not work (OptionsetFieldSet OK)

30 December 2009 at 10:33am
How to add on dropdown selection onchange="FilterModels()
like this:
<select name="makes" onchange="FilterModels()" id="makes"> -
Re: dropDownField in Userforms does not work (OptionsetFieldSet OK)

1 January 2010 at 9:17pm
Webdoc - off topic to this post so you when you want to break discussion off a topic please make a new thread.
| 1445 Views | ||
|
Page:
1
|
Go to Top |



