userform: required input

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
onli
Regular
Posts: 2830
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

userform: required input

Post by onli »

I want to bold only these labels of the userform which inputs are set as required in the spamblock-plugin. My idea is to add a css-class to the label if the option is set. Is there a smarty-variable for checking this?
sincerely
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: userform: required input

Post by garvinhicking »

Hi!

I don't think so; you would need to edit the commentform.tpl yourself to add the classes to the fields you marked as required.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
onli
Regular
Posts: 2830
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: userform: required input

Post by onli »

Thank you garvin.
A pity - I knew I can do this manually, but wanted a dynamic solution :)
sincerely
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: userform: required input

Post by Don Chambers »

Garvin - when using dynamic forms, we have this loop:

Code: Select all

{foreach name="field" from=$commentform_dynamicfields item="field"}
which then lets us do this:

Code: Select all

{if $field.required}whatever{/if}
Perhaps something comparable could be added to the regular comment form??
=Don=
onli
Regular
Posts: 2830
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: userform: required input

Post by onli »

Would be a nice feature. Same with the "Mail won't be shown"-option.

Short explanation: I thought a bit about improving the comment-area and the ability to react to these options dynamically would give me the opportunity to release a template containing these improvements (or at least let my template react nicely if I change such options in the future).
Post Reply