Forums

Add Class To Form Container

LikeStuff 21 Oct, 2019
I would like to add a class to the below. How can I do that without touching the core files?

<form id="load-form" class="ui form G2-form"

Thanks!
GreyHead 22 Oct, 2019
Hi LikeStuff,

You can do it using JavaScript - there are several methods that will work - here's an example using the JQuery addClass() method

Bob
healyhatman 22 Oct, 2019
Is this for the V6 that you've tagged it as, or for V5? Because it's a lot easier than bothering with jQuery if you're doing it in V6/.
LikeStuff 25 Oct, 2019
I'm using V6. What is the other option to do this without using JavaScript?

Thanks in advance!
healyhatman 25 Oct, 2019
For form to custom, use form area, there's a field in there for adding a class.
LikeStuff 25 Oct, 2019
Oh boy! So sorry but I don't see it😟

I changed it to Custom. I'm looking on the Forms Settings Tab. Thanks!
healyhatman 25 Oct, 2019
Then under "areas" there's a form area, put it in and out all your form elements inside
LikeStuff 28 Oct, 2019
Sorry but I'm not finding what you are referring to - I don't see a form area. It can't be that hard....

Please see attached. Thanks

LikeStuff 28 Oct, 2019
Ok thanks. I can't figure out where it should go - so nevermind!. A quick step by step would have been nice.

Thanks!
healyhatman 28 Oct, 2019
Answer
I told you everything? Here it is again though.

1. Set form to "custom" under settings.
2. Under "pages" then "areas" use a "form area". There's a class field in it you can use to add classes.
3. Put all your form elements inside the form area.
4. Set the "submit event" to the event name you want the form to submit to

That's it.
LikeStuff 19 Nov, 2019
I got it. Thanks for your help and patience🙂
This topic is locked and no more replies can be posted.