[SOLVED] FEU: Set Form CSS Class In {$startform}

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
ptysell
Forum Members
Forum Members
Posts: 33
Joined: Tue Oct 10, 2006 1:16 am

[SOLVED] FEU: Set Form CSS Class In {$startform}

Post by ptysell »

Trying to figure out how to set the css class in {$startform} so that instead of generating

Code: Select all

<form id="forumID" method="post" action="http://myurl.com/index.php?page=1" class="cms_form">
it would generate

Code: Select all

<form id="forumID" method="post" action="http://myurl.com/index.php?page=1" class="MyCSSClass">

Sure it is something simple but being driven nuts migrating over from some legacy CSS that will be difficult to update.

Thanks for the help.
Last edited by ptysell on Fri Apr 24, 2015 3:25 pm, edited 1 time in total.
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: FEU: Set Form CSS Class In {$startform}

Post by staartmees »

"After a bit of nagging on the part of people who actually respect standards, FormBuilder no longer encourages tricks like embedding CSS in static text fields. Instead, it creates a stylesheet called "FormBuilder Default" that you are encouraged to attach to the page template that you use for pages that contain your form."
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: FEU: Set Form CSS Class In {$startform}

Post by velden »

Quick and dirty:

Code: Select all

 {$startform|replace:'cms_form':'myClass'}
ptysell
Forum Members
Forum Members
Posts: 33
Joined: Tue Oct 10, 2006 1:16 am

Re: FEU: Set Form CSS Class In {$startform}

Post by ptysell »

staartmees wrote:"After a bit of nagging on the part of people who actually respect standards, FormBuilder no longer encourages tricks like embedding CSS in static text fields. Instead, it creates a stylesheet called "FormBuilder Default" that you are encouraged to attach to the page template that you use for pages that contain your form."

How does that help me with opening a form tag in FrontEndUsers?

The goal is to not rewrite/test 500 form related CSS styles/structure.
velden wrote:Quick and dirty:

Code: Select all

 {$startform|replace:'cms_form':'myClass'}
I figured out the issue.

The CSS styles are hardcoded in [edited by moderator] the core which is called by FEU via the {$startform} tag.
Post Reply

Return to “Modules/Add-Ons”