Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

UserForms problem?

Go to End

6 Posts   907 Views


Community Member, 70 Posts

24 May 2012 at 11:56am

Edited: 25/05/2012 5:56am

I have created a form and included rules. Currently all the options are shown when the form is submitted even though they are blank and the user has never seen them from their selection. How can I stop this?

Also I would like to process the data. So each time a record is entered with a reference number it goes to that separate record.

Can somebody point me in the right direction .. please???

Edited from: Is there a way to just show fields that have been filled in in the submitted section of the site. I have a form with rules and only want the relevant questions which have been answered shown?


Community Member, 59 Posts

24 May 2012 at 9:08pm


On creating the form you could just check for each field if there's a value for it and the decide wether to create / display this field or not.



Community Member, 70 Posts

25 May 2012 at 12:12am

Am a bit confused as am a newbie. I have all the fields with rules to hide and show on the actual form. It is on the submission that it is showing lots of blank fields. Am not sure how to do what you are explaining?


Community Member, 70 Posts

25 May 2012 at 9:13pm

OK .. I have found some code which I think does what I want ...


$(this).children(':input[value=""]').attr("disabled", "disabled");

return true; // ensure form still submits



I have absolutely no idea where to put this code or if it is suitable? Please would somebody help?!


Community Member, 70 Posts

26 May 2012 at 7:56am

If there is no way of omitting the blank fields then why offer dependant forms? Really struggling here.


Forum Moderator, 5523 Posts

26 May 2012 at 8:01pm

Basically this is quite difficult, the visibile of the form field is handled in the front end and the form submission in the backend. The state of a field (visible vs hidden) isn't passed (if you have JS disabled, all the fields will be shown by default)