• I was reading the documentation with regards to hidden fields and wondered if this or something similar was possible for registering the button the person clicked on to arrive to the sign-up page.

    I am developing a website for a travel business and am using custom fields to output info to buttons. Each tour can have several sets of dates so the end button (which they would click on) shows the tour title (always the same) and the dates they want. I’ve considered using something like (albeit, it may not be the best way and of course, dymacially input to be correct info) <a href="/signup-form/" data-id="tour title - month 00 - month 00, 2016">Sign Up</a>.

    Is this something I can use for the sign-up form, then make such info sortable as people sign up?

    It seems likely the sign-up form has to be displayed on the same page for this to work (?)

    I have some PHP and jQuery knowledge. Thanks!

    https://www.ads-software.com/plugins/participants-database/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Jedediah White

    (@toasterdroid)

    Update: Here’s a link to the live site – specifically, one of the tour pages I’m developing. If you please click the ‘Reserve Now’ button, it will load the form in the right side. However, the form is nowhere near where I need it to be. In my mind, it should take the data-id from the button you click, and show them what tour they’re signing up for.

    Plugin Author xnau webdesign

    (@xnau)

    When the user clicks on the button, what you have in the data-id should identify the tour (could just be an ID number) then when your form opens, that value is used to look up the data (dates, title, etc.) and use that in the form. This means you need to create a data structure that javascript can read. That data structure will have the details on all the tours that are on offer and the value in the data-id attribute is used to select the correct data from the data structure.

    WordPress has an easy way to populate a javascript object with data, using wp_localize_script() You’d set that up in your theme functions file so when your javascript is included, it will include the data object also. Take a look at this: wp_enqueue_script() if you’re unsure how that is done.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hidden Signup Field form from clicked button’ is closed to new replies.