Page 1 of 1
Adding classes to <li> when required
Posted: Sun Jan 20, 2008 5:38 pm
by zetep
Evening!
I am busy adding some AJAX functionality to my CMSMS implementation, which is going pretty well. The only problem i have encountered is being limited by the form-templates and the formbuilder module. I haven't found a way to assign classes to the tags, when they are required to be filled in. All that happens, is the getting a class=required, instead of the tag. Normally this wouldnt be a problem when styling a website, but for a certain real-time form validator i need to give the tag a class ().
Is there a way to do this? My formtemplate skills are laughable, so maybe its really easy to get this going.
Thanks in advance!
Re: Adding classes to <li> when required
Posted: Sun Jan 20, 2008 9:02 pm
by Dr.CSS
Have you clicked all the tabs available when making the form, there is some where to add a class to the fields you make, or in the template that renders them...
Re: Adding classes to <li> when required
Posted: Mon Jan 21, 2008 7:52 am
by zetep
Yes, you can add classes to the div surrounding the form elements. Not the actual form elements. :/
Re: Adding classes to <li> when required
Posted: Mon Mar 10, 2008 10:29 am
by sonictrip
You can add classes to the form elements, each element has a tab with CSS class box for inserting the class name you want the element to use in "Extensions / Formbuilder / Form Name / Form Field / Advanced Settings / CSS class for this field"
Im having trouble trying to style "Select" or "Option" dropdown lists, have tried adding .option and .select to the builtin css in the actual form but it doesnt seem to be working.
Anyone know how to style the options in a drop down box?
Thanks.
Re: Adding classes to <li> when required
Posted: Tue Mar 11, 2008 1:48 am
by Caesonia
zetep wrote:
Yes, you can add classes to the div surrounding the form elements. Not the actual form elements. :/
I am having the same issue for form elements.
For example, I have classes such as .textbox, that I like to apply to my submit buttons, textboxes,etc. It takes you from looking at a site like this one that I am building
http://cmsms.hotcakesgourmet.biz/cmsmadesimple/ to this one I built 3 years ago,
http://machoarefs.foundationwebdesign.org. See how much 'smoother' the login form looks, with the form buttons and boxes? I don't always go for a flatter look, but often it has helped people visually.
This is a style I would like to stick with. But I can't see exactly how to do it. I have tried adding into the obvious HTML, and I am looking into the deeper php coding, but I haven't come up with a solution yet.
I love smarty, and that was one reason I chose CMS made simple, but I think many of these forums are a little too light on the HTML for the Smarty to be maximized - in other words, seperating web design from the development and hard core coding.
So, any help on dealing with the form elements in both form builder and search would be greatly appreciated.
Re: Adding classes to <li> when required
Posted: Tue Mar 18, 2008 11:05 am
by sonictrip
Here here, i just want the drop down boxes to look like they do on thsi site:
http://sonictrip.net/healthstore/
Check out the currency drop down box at the top... how do you style the boxes like this in Formbuilder?
Re: Adding classes to <li> when required
Posted: Wed Mar 19, 2008 10:37 pm
by Dr.CSS
I don't see any forms on those sites so I can't tell you what to use for styling, in the form when you make a field the Advanced Settings tab has a box for "CSS Class for this field:" that will add a CSS class to it...
Re: Adding classes to <li> when required
Posted: Tue Mar 25, 2008 9:46 am
by sonictrip
Hi Mark, we're aware of the "CSS class for this field" but that only seems to style the text label and not the text box itself. How do you style the text box itself to look similar to the currency drop down box on this Zencart site im developing at the moment:
http://sonictrip.net/healthstore/
I've tried styling the classes:
.select
.option
.textarea
Doesnt seem to work though...
Thanks.