I have added a checkbox to a form, and the field label says "I have read legal notice" how can I link 'legal notice' to the legal notice page? How can I add a link?
Thanks
I have added a checkbox to a form, and the field label says "I have read legal notice" how can I link 'legal notice' to the legal notice page? How can I add a link?
Thanks
HTML isn't supported within the labels, but you can add the link using jQuery. You can find an example here.
http://www.gravityhelp.com/forums/topic/how-to-add-hyperlinks-in-the-form#post-6838
hi Kevin
and where exactly do I paste that code?
Thanks!
See the section on jQuery/Javascript here for placement info
http://www.gravityhelp.com/documentation/page/Where_Do_I_Put_This_Code%3F
So I have pasted this http://www.pastie.org/2163913 to a file called custom.js within a js folder of our theme. Then I go back to the form ID #2 on form dashboard and edit, and what should I do then?
You need to make sure the custom.js file is properly referenced in the theme header.php file so it gets loaded on the page. You also want to make sure this get's loaded AFTER the jQuery library itself gets loaded so you could put the script reference just before the </head> tag to be safe.
http://codex.wordpress.org/Using_Javascript
http://codex.wordpress.org/Function_Reference/wp_enqueue_script
Hi Kevin
I don't see any reference to javascript on theme's header.php but it might probably be bcs I don't get it since I am not a coder. I am just a gravity forms user who would like to have a link to TOS in a checkbox. But since it's this complicated, I'll forget about it. Thank you.
Elena,
If you'd like to post a URL to your form page I can take a look and help you hook everything up. I shouldn't be a big deal.
Hi Kevin
Thanks a lot. Website is on maintenance mode for the public so unless I give you admin access, there won't be a way to see the form page. Is that ok with you? And if so, where should I send the admin/pass details to?
E.
Elena,
You can send the info to me at kevin@rocketgenius.com
Please reference this topic URL as well so I can refer back to it if needed. I forget things like that sometimes.. :)
I just have, thanks!
Elena,
A couple of things.. you don't need to include the opening/closing script tags since the custom.js file is already reference/loaded on the page and enclosed in those. Also, I looked at your form, and the class name of the label you were trying to change was different than what you had in the code.
That said, try replacing the entire contents of your custom.js file with this..
Before you do, I'd back up the original file just to be on the safe side. I always prefer to have a good backup in case anything happens.
Give it a shot and see if that works for you.
Hi Kevin
Thank you. I have backed up custom.js and added yours. Nothing is broken but still, what am I supposed to do so that in here http://cl.ly/3d0X08170r1U3H3x1H42 the link appears?
http://cl.ly/2f0e3e2i0E0W0L181t2V
Okay, I see what it is. We need to re-order the code a little. Go ahead and replace the current custom.js contents with this.
It worked as intended in my test.
screenshot: http://bit.ly/qn89ZQ
Lucky you Kevin!
I've just replaced old custom.js with your new custom.js and bad luck: no magic.
:S
Elena,
Sorry it took me a while to come back to this but I just visited the page and I see the link working properly. I'm assuming I'm looking at the correct form.
http://cirugiaesteticamasculina.com/pide-cita/
screenshot: http://bit.ly/pMG8RF
I had added a custom link style in my previous test just so it would show up better. Your default link style is dark and doesn't stand out much so that may be why you're missing it.
Haha, nope, it wasn't showing. I would have noticed it, even if black :D Now I see it, I think it was a cache issue! So finally, great, thank you very much Kevin.
Yeah, I thought it might be a cache issue as well. Either way, I'm glad it's working for you now. Let us know if you need anything else.