• Resolved raphaelbajou

    (@raphaelbajou)


    Hello,
    I create a form with a your dropdown dynamic for select a dealer and deliver a message.
    My dealers posts are categorized. If I use the choice post and the good taxonomy it’s working. I have a my dropdown with all my dealers.
    For me the issue is the value of each option is the slug.
    I need option value is an email (actually save in a custom post field).
    How can I do that in use the “custom” function ?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    I need option value is an email (actually save in a custom post field).

    Not sure i understand… You need the option label or the value in your email?

    The value is set to the post slug in your example while the label is the post title.

    What Do you mean by “actually save in a custom post field”? Are you also trying to save your form as a custom post?

    Thread Starter raphaelbajou

    (@raphaelbajou)

    Thanks,
    Actually in the select of post I have :
    <option value="(post slug)">(post title)</option>

    I would like a structure like that :
    <option value="<?php get_field('acf_email'); ?>">(post title)</option>

    In fact, when the user select a dealer (post) I want send an email to the dealer (get_field(‘acf_email’)).

    I am sorry for my bad english !

    Plugin Author Aurovrata Venet

    (@aurovrata)

    So acf_email is a custom field with the email of the dealer?

    The only way to achieve this is to use the filter option on the dynamic dropdown. The dynamic dropdown can have a taxonomy as its source, a post title, or a filter. If you choose the filter then you can build a custom option list.

    I am sorry for my bad english !

    No worries. I hope my explanation is clear for you.

    Thread Starter raphaelbajou

    (@raphaelbajou)

    I thought so, but do you have an other documentation for this custom function.
    I’m lost !

    Plugin Author Aurovrata Venet

    (@aurovrata)

    Did you try the helper code? When you select the custom option a link is provided with the custom hook point. Click the link to copy the helper code to the clipboard and paste it in your functions.php file.

    Plugin Author Aurovrata Venet

    (@aurovrata)

    I am assuming you have resolved your issue since I have not heard back from you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Dynamic Dropdown with value is different to the term’ is closed to new replies.