Replace Radio Options on next page based on choice on current page

Home Forums Quform WordPress Replace Radio Options on next page based on choice on current page

This topic is: not resolved
  • This topic has 5 replies, 2 voices, and was last updated 3 years ago by Ally.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #32753
    pixelblvd
    Participant

    Hi,

    is there a smart way on dynamic replace options of a radio select from one page based on say the radio selected on another page. Technically its probably irrelevant if its the same or different page.

    If it would be a simple select or radio button I could simply use an ajax call and replace the options, but the radios I want to replace are using the option style “button”, so the markup is a little more complex. Any recommended way of handling this?

    #32754
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #32755
    pixelblvd
    Participant

    Great, exactly what i was looking for.

    There’s only a small problem now. If i replace the content of Option Field 2, the conditional logic no longer works for it. i want to show a a third option field when selecting a value in the second one. I guess the event listener is removed once i use .replaceWith….

    #32758
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #32760
    pixelblvd
    Participant

    Thx Ally, that worked.

    Now i have one more minor problem.

    Option field 3 is actually dynamically populated as well, based on Option Field 2. i used the same code you provided me before. That works.

    The minor problem is, that as its a ajax request and the fields are on the same page, the field shows instantly when changing Option Field 2 and then after the Ajax request is completed the options get replaced. Would be nice if could wait to show field 3 after the request.

    My solution to that would probably be to disable the conditional logic in the editor and do manually with jS. Or is there another solution?

    Thank you!

    • This reply was modified 3 years ago by pixelblvd.
    • This reply was modified 3 years ago by pixelblvd.
    #32764
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy