Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
hello ... a question re forms.

Setting required to '1' with the cms:input tag results in an asterisk next to the label. I've hunted all over and cannot find where to change this. Is it possible?
Why don't you use label in your css file and set this to whatever you like ?

label {
font-size: 0.875rem;
and so on ...
}
I load frameworks and write bugs on top of them, after that I rearrange the code so that it looks like a cool product.
the asterisk is held in a <span> with class of k_fielderror
Code: Select all
<label for="name">
Full name
<span class="k_fielderror">*</span>
</label>


I haven't been able to override the asterisk generated by Couch behind the scenes and target that with CSS - if you know how please let me know!
I'm not sure, didn't test this, but I think you can solve this with CSS:

.k_fielderror:first-letter {color:white; } (if the background is white) see:http://www.w3schools.com/cssref/sel_firstletter.asp

You could also remove the * by removing this from your_couch_folder/field.php @ line 1019

if( $this->required ) $pre .= '<span class="k_fielderror">*</span> ';
I load frameworks and write bugs on top of them, after that I rearrange the code so that it looks like a cool product.
@potato - adding to what Tom suggested:
you can skip using the <cms:fieldset> tag altogether and hand code your own HTML.
thanks Tom - the css suggestion wouldn't work - not sure why. So I've commented out the line in field.php - great - now the form no longer looks like the night sky!

KK - I copied and amended a form I've previously implemented on another site - to speed things up - so didn't want to have to change the way I'd done it - and I'm more comfortable with the Couch tags. In forms where there are lots of required fields I prefer to show 'All fields required' or something, rather than asterisks all over it. But no problem - I know what to do now. Thanks.
6 posts Page 1 of 1
cron