• Resolved B & L Marketing

    (@unifiedac)


    Hello,

    Is it possible to display a form that requires user input before the post loads? The form fields are specific to each post and would be generated dynamically (custom fields?). The values of the form fields are then sent to variables used in post. For example:

    1. User visits post
    2. Form field displays.
    3. User completes the form field (Let’s say “Name”).
    4. Value from id=”Name” form field is passed to post in the $name variable.
    5. The post already contained the unique variables and now returns the user’s input:

    Happy Birthday $name!

    I had started coding this function from scratch with PHP/mySQL, but I wondered if there was a way to do this in WordPress. Any help is appreciated.

Viewing 1 replies (of 1 total)
  • Thread Starter B & L Marketing

    (@unifiedac)

    I figured this one out. Pass the form field variables to the URL, retrieve them on the same page as new variables and do whatever you want with them.

    Setup an if/else statement to determine whether to show the form or post content.

Viewing 1 replies (of 1 total)
  • The topic ‘User Input Before Loading Post’ is closed to new replies.