Home Forums Plugin Support WP User Frontend Pro form and dropdown questions

This topic is: not resolved

Tagged: 

This topic contains 4 replies, has 2 voices, and was last updated by  Nayem 4 years, 3 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #35243

    Jie Feng
    Member
    Post count: 7

    1. can i display a form in a template file (eg: category.php) using php code? < ?php>< ?>

    2. so i created a form which allows people to summit pc info. It consists of dropdowns for taxonomy and terms.
    eg:
    dropdown menu A for custom taxonomy (Acer, IBM, DELL) /hardcoded the value for this dropdown
    dropdown menu B for Acer taxonomy terms. (Acer has PC1, PC2, PC3)
    dropdown menu C for IBM taxonomy terms. (IBM has PC11, PC12, PC13)
    dropdown menu D for DELL taxonomy terms. (DELL has PC111, PC112, PC113)

    so A would display, and dropdown B C D would be hidden by default. If user selects a Acer from dropdown A, then the corresponding Acer dropdown would appear, and user could select a term there.

    This works well when user create new post. and i did all this from the drag and drag UI.

    My question is, to make user experience better,
    when user is viewing the taxonomy-term page (eg: Acer-PC1.php), i want to show the same form, but since i already know what the taxonomy and term are (Acer and PC1)
    can I have the dropdown A and B automatically populated with the selected value ‘Acer' and ‘PC1'? so user does not have to manually select them?

    if so could you please provide some simple code? thanks!

    #35319

    Nayem
    Moderator
    Post count: 6480

    Hello Jie,

    We can help you about making the form. But we can not help you about displaying the data. Because displaying things depends on themes and we do not provide support in such case.

    Thank you ๐Ÿ™‚

    #35344

    Jie Feng
    Member
    Post count: 7

    Hi,

    1) okay whats the code for showing the form in php code?
    say using short code i would use [wpuf_form id=”2541″], but inside a single.php page,
    how do i call the form using < ?php ... ?> code?

    2) I am not asking for displaying the data in specify.
    I am asking if there is a way to change a dropdpwn selected value programatically, maybe using hook like wpuf_add_post_form_top and change settings array?

    Gravity form has a feature which allow you to set dropdown selected value from URL parameters,
    say if the url is http://www.mysite.com/myform?DropdownID1=Acer&DropdownID2=PC1
    then the form renders and dropdown1 would have Acer as selected value, and dropdown2 would have PC1 as selected value.

    That's quite helpful. Does your plugin has similar feature? thanks

    #35421

    Nayem
    Moderator
    Post count: 6480

    Hello Jie,

    I have to discuss with our developer team. They are now in weekend. I will come back to you tomorrow with the feedback of our developer team.

    Thank you ๐Ÿ™‚

    #35451

    Nayem
    Moderator
    Post count: 6480

    Hello Jie,

    1. You can use this code to show the form- <?php echo do_shortcode( $content ) ?>. You can know more about this from here- http://codex.wordpress.org/Function_Reference/do_shortcode

    2. We do not have such kind of feature right now. I will notify to our developer team about this feature. Hope they will think about it to implement.

    Thank you ๐Ÿ™‚

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘form and dropdown questions’ is closed to new replies.