Support

Account

Home Forums General Issues Select Dropdown Inside Repeater With Mailto and Tel based on Selection Reply To: Select Dropdown Inside Repeater With Mailto and Tel based on Selection

  • @andisaleh

    See image and php code below but essentially:

    -user goes to WP Page
    -Adds Image, Title, etc
    -Select Dropdown – choice of PHONE or EMAIL

    If user Selects PHONE, it populates tel: before the subfield they enter of a phone number so it makes it a link

    If user Selects EMAIL, it populates mailto: before the subfield they enter of a phone number so it makes it a link

    Image Explanation: https://pasteboard.co/5fFEy9KEfp0o.jpg
    Code Sandbox: : https://onlinephp.io/c/ea1db

    in the php code – its in the div “phoneemail-selection” towards bottom where id imagine the IF / ELSE statement would go: