WordPress.org

Ready to get started?Download WordPress

Forums

Participants Database
[resolved] private id as a variable to pass to another form as input (7 posts)

  1. gdisalvo
    Member
    Posted 1 year ago #

    Hello,
    I am using the plug-in and it works as expected. What I am looking to do is pass the private ID to another form. I can display the value on the form when it returns from the email link but, it is text that is shown and not a variable (global) or something to pass within a button click to the next form. The next form needs this unique ID because is is the parent. The other form holds the child information I need to save separately in a separate database. Can you assist?

    http://wordpress.org/extend/plugins/participants-database/

  2. xnau
    Member
    Plugin Author

    Posted 1 year ago #

    gdisalvo,

    It may be as simple as placing the PID value in a form field and then when that form is saved, the PID will be saved with it:

    <input type="text" name="pid' value="<?php echo $_GET['pid'] ?>" />

    Am I understanding you correctly? Can you share a link to the page so I can see what you're trying to do?

  3. gdisalvo
    Member
    Posted 1 year ago #

    hello xnau,

    Thank you for the quick response. I appreciate the quick feedback. It will be hard as I am still building on XAMPP and will transfer to the web site later this month or early next. But rest assured, I will invite you to sample the online registration when completed.

    1st I will give you answer a try. Please bear with me as I had to reinstall the wp again as I prepare to rebuild something that is cleaner. I had too many things downloaded from plug-ins to themes and web tools that I needed to clean house and start from scratch as I document the process before moving to the domain.

    I will get back to you soon.

  4. gdisalvo
    Member
    Posted 1 year ago #

    I gave up and will look for alter way to handle my visitors.

  5. Messer_002
    Member
    Posted 1 year ago #

    Hi xnau,

    I know this is a resolved entry but i am trying to duplicate
    <input type="text" name="pid' value="<?php echo $_GET['pid'] ?>" />

    I'm currently working on a tabbed version of the single display page which will have an extra content field external from the plugin but on the same page for sending a request to contact a participant.

    Only problem is i had to setup the new content section outside of the loop, I am by no means a programmer but I have gotten this far!

    Question is...how do i get the page id to display within the form fields without disrupting the loop and with actually displaying the page ID without actually being in the loop.

    I'm stuck :( the only other option would be get them to manually input the data.

    Hope you can help,

    Regards

    Messer

  6. Messer_002
    Member
    Posted 1 year ago #

    Solved! I worked it out, it seems in order to put this code into a form input value you have to echo all of it.. like this

    <?php echo '<input ','type="text" ','value="'.$this->participant_values['private_id'].'"','/>' ?>

    I posted here just in case someone needs it

  7. xnau
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks, that's great...to clarify: if you are on a plugin template you can use the "$this" object, but if you are on a regular WP theme template, that won't be available, that's why I suggested grabbing it from the $_GET array.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic