field css classes

Permalink Browser Info Environment
I just used the CSS Class option when creating a field. I used it for a number of field types "Text (no user input)" so that I could create some form sections. But no class was applied.

I also added a class to a series of fields that I intend to capture numbers for (did not want to use the number field so as to require the answer to be as a number), and noticed the class was applied to the input rather than the surrounding div tag. I figured this was why there was no class applied to the "Text (no user input)" field type, (because that field type has no input).

I would think the CSS class would be applied to the surrounding div rather than the input for that field, thus allowing for someone to group a style for a number of fields in the CSS. Not sure if you agree or even if you could change such a feature at this late in the game for backwards compatibility, but thought I would put it out there.

For what it is worth, I do greatly appreciate that fact you built in having custom class/ids per field and throughout your plugin as it makes it possible to control the styling with greater ease.

peace,

Type: Discussion
Status: New
uswebdesigner
View Replies: View Best Answer
jgarcia replied on at Permalink Best Answer Reply
jgarcia
So, here's what I did (so as to not break any current installations). There is a new field attribute called "Container CSS Class." This gets applied to the surrounding <div> and "Field CSS Class" gets applied to the input. I'll post the new version by EOD.
uswebdesigner replied on at Permalink Reply
uswebdesigner
nice solution. Thanks.
FatTony1952 replied on at Permalink Reply
FatTony1952
Was the CSS Class option ever addressed? I'm trying to apply a class to section titles as well using the 'Text (no user input)" option and no class is being applied.

Thanks!
jgarcia replied on at Permalink Reply
jgarcia
Yeah, I just confirmed that it's working. If you specify a css class for text (no user input), it wraps it in a div with that css class applied. If not, there is no div.
FatTony1952 replied on at Permalink Reply
FatTony1952
Then I guess my next question would be, in the area where you can define additional classes, do you need to define your class as 'label.classname', etc.? Here is the latest css code I have tried and placed in the additional css class/IDs section of the styles page.

.section-titles {font-size: 16px; font-color: #000000;}


In the CSS Class text box of the form builder, I tried putting 'section-titles', and '.section-titles'. Neither have worked to this point.

I am using 1.4, but the version history doesn't say whether this update was done in 1.4 or 1.4.1.

Thanks!
FatTony1952 replied on at Permalink Reply 2 Attachments
FatTony1952
By default, the section I need wrapped in a custom css class looks like this in code:

<div class="sem-field-container" id="sem-field-container-3">Personal Data</div>


I have a custom class applied to this in the form section in the dashboard. I have a screen grab of what this looks like in the form edit screen and also a screen grab of the class I'm trying to attach to it.
jgarcia replied on at Permalink Reply
jgarcia
Okay, I'm not sure which version it was addressed in (it appears I didn't document it), but it is definitely fixed in 1.4.3, which I will be uploaded tonight. If you upgrade to 1.4.3 you should be good to go.
FatTony1952 replied on at Permalink Reply
FatTony1952
Worked fantastically!

Thanks!
jgarcia replied on at Permalink Reply
jgarcia
Good to hear!
rayjohn66 replied on at Permalink Reply 4 Attachments
rayjohn66
I know this is an older post but I'm having the same problem with 1.8.1 but before I call it a bug I'll put it here. I have spent more than 5hrs trying to figure out what I'm doing wrong. I've gone through every help,forum, video that I could find. Please HELP

Attached are screenshots showing how I am attempting to add custom class to a container.
FatTony1952 replied on at Permalink Reply
FatTony1952
Can you just apply the float:right; property to the sem-field-container class?
rayjohn66 replied on at Permalink Reply
rayjohn66
sure, that works fine, but I need to put different classes against different fields, I used the float:right; to show how I can't get to my custom selector for a particular field.

From what I read, you did something similar. Does the firebug screenshot look normal?

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.