• Hello,

    Is there a way to set the dropdown value selected from the previous page?

    Example:
    I have one page with contact forms for donations where the user can select custom post type post from drop-down and send form. Works great.
    I was thinking, when the user is on the post to have the button that leads to a donations page. When the donations page is loaded, on the drop-down menu is selected not first option, but the previous page the user was on.

    Basically if I click on URL:
    sample-page.com/donations?post_id=29
    On my contact form, in the drop-down menu is selected post with the id=29

    Or something similar.

    The user can change the option, but the important thing is that the loaded option is the id of the post he came from.

    Thanks in advance,
    Igor

  • The topic ‘Get value from previous page’ is closed to new replies.