10375 Posts in 2190 Topics by 1707 members
| Go to End | Next > | |
| Author | Topic: | 2384 Views |
-
[Solved] User Forms: Custom Fields, Add rule button doesn't do anything

26 June 2010 at 6:54am
I tried clicking on the green plus sign to add custom rule. I'm not sure what an add rule does, but nothing opens up after clicking on this link in the userforms module.
-
Re: [Solved] User Forms: Custom Fields, Add rule button doesn't do anything

26 June 2010 at 7:12am
There needs to be a change on UserForm.js line 255:
from
$(".customRules .addCondition").click(function() {
needs to match this. And then you can get Custom Fields to work.
$(".addCondition").live('click', function() {
Can anyone help me figure out how to add custom css rules to certain text fields. I would like first/last name to float next to each other on the same row (Custom CSS Userforms Help please)
-
Re: [Solved] User Forms: Custom Fields, Add rule button doesn't do anything

26 June 2010 at 8:00am
Thanks for this tip. Is there any reason why this isn't enabled by default?
-
Re: [Solved] User Forms: Custom Fields, Add rule button doesn't do anything

26 June 2010 at 9:39am
This was a bug that was fixed last week - http://open.silverstripe.org/changeset/106720
Download the trunk / daily build version from http://silverstripe.org/user-forms-module/ to get this fix. I'll give the 0.3.0 release another week for any more bugs and do some more testing and do a 0.3.1 release to cover this issue and a couple other ones.
-
Re: [Solved] User Forms: Custom Fields, Add rule button doesn't do anything

26 June 2010 at 10:05am Last edited: 26 June 2010 10:11am
Quote
Can anyone help me figure out how to add custom css rules to certain text fields. I would like first/last name to float next to each other on the same row (Custom CSS Userforms Help please)
The easiest way I have found is to style using the "id" of the field (or its container more specifically) which will be unique to that form based on the field type. Then usediv#EditableTextField1, div#EditableTextField2{float:left; clear:none}
in your form.css for example.Only down-side is that the first two text fields of any other UDF will also float left.
-
Re: [Solved] User Forms: Custom Fields, Add rule button doesn't do anything

26 June 2010 at 3:00pm
@Willr
Do you think it would be appropriate to have an option to add an additional css class to a form field in the options dialogue?
It's perhaps not an ideal end user setting but I do think there is a need to control the layout of individual form fields sometimes, I've done it on several occasions and with a long form, styling with the id can get very tedious and runs into issues when you have more than one form on the site.
I have experimented with EditableTextField and got it working nicely using $field->addExtraClass(), no validation yet but I'm not going to bother unless you're open to it as useful functionality.
Cheers,
Rich
-
Re: [Solved] User Forms: Custom Fields, Add rule button doesn't do anything

26 June 2010 at 3:05pm
@TotalNet - Funny you mention adding classes. I had just created a ticket for it http://open.silverstripe.org/ticket/5751 from http://silverstripe.org/customising-the-cms/show/287199?start=0#post287207. But yes I think it would be useful and relatively easy to integrate.
-
Re: [Solved] User Forms: Custom Fields, Add rule button doesn't do anything

28 June 2010 at 1:43pm
Well in that case...
I've checked out the latest trunk code for UDF and will look into it this week. Do you have any timescales for 0.3.1 or can I take my time with this? ;)
Cheers
Rich
| 2384 Views | ||
| Go to Top | Next > |



