Hidden field – Custom Value – how to get a value
-
Hello!
I’ve got a table of different courses. Each course has an “Enroll” button. When the button is clicked, it triggers the pop-up to appear. This pop-up has a contact form that I made with Forminator plugin. I added a hidden field with a “Custom Value”as a Default Value.
So, I want to do this: when the button of the course is clicked, the value of this button (which is the name of the course it’s assigned to) would automatically get inserted into that hidden field, so I would know what course exactly a user would like to enroll.
That’s what my button looks like:
<a class="popmake-2710 course-info__enroll blue-enroll-link" href="https://www.aviatour-expert.ru/kursy-i-tseny/?the-course=the-course-name">Enroll</a>
So, the class (“pop make-2710…”) allows the pop-up with the contact form to appear. In the “href” I set the-course value to the name of the course: I used “the-course” in the “Custom Value” of the Hidden Field in the Forminator form, and “the-course-name” is what I want to get in this hidden field when the form is sent by user.
I tried to add this code – https://gist.github.com/wpmudev-sls/dc9ab640bf675b274ff12acfba3965db – but it didn’t work. Wnen a user sends the form, the value of this hidden field just comes out as “the-course”.
Could you, please, help me to figure out what I’m doing wrong here?
- This topic was modified 2 years, 5 months ago by .
- This topic was modified 2 years, 5 months ago by .
- This topic was modified 2 years, 5 months ago by .
- This topic was modified 2 years, 5 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘Hidden field – Custom Value – how to get a value’ is closed to new replies.