Home Forums Plugin Support WP User Frontend Pro Conditional logic and action hook?

This topic is: resolved

This topic contains 5 replies, has 2 voices, and was last updated by  Dawn 4 years, 10 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #23076

    Dawn
    Member
    Post count: 28

    I am currently using WPUF to run a submission form where people use a dropdown to select the post format.

    The post format dropdown was set up using the method described here:
    http://wordpress.org/support/topic/plugin-wp-user-frontend-set-post_format-when-adding-post?replies=3#post-3709483

    It is shown on the form using an action hook. People can select from: Standard, Image Gallery, Video Player, Audio Player

    Currently, I also have spaces on the form for people to upload images (for the Image Gallery) and URLs for video and audio links. As is, all of these show up regardless of the post format they selected.

    It would be great if I could use the new conditional logic feature so that if the image upload only shows up when someone selects Image Gallery, video URL only shows when someone selects Video Player, etc.

    Any ideas on how I can accomplish this?

    Thanks!

    #23084

    Dawn
    Member
    Post count: 28

    Wait a second… Post formats are already set up as taxonomies in WordPress. Would it work to create a custom dropdown field with the values for the post format types?

    If that's possible, then I can use the conditional logic feature to show other fields depending on the post format type…

    #23086

    Dawn
    Member
    Post count: 28

    Gave above idea a try, but no luck. Selections in made in dropdown fields created through the form editor (instead of added with an action hook) aren't saved.

    #23106

    Sekander Badsha
    Member
    Post count: 2067

    Are you trying to do something like this ? http://demo.wedevs.com/wpuf/conditional-test/

    If yes and want to see how did this, login to our demo site (user,pass is demo) and see there is a form named conditional test. You'll get the idea how I did it.

    Let me know if you feel any difficulties.

    #23130

    Dawn
    Member
    Post count: 28

    Thanks for setting up the test form, but it doesn't do what I need. In your example, you simply created Categories named Image Gallery, etc., so the selection saves as the given Category – it needs to save the actual Post Format.

    #23144

    Dawn
    Member
    Post count: 28

    I was finally able to get Post Formats and conditional logic to work using Radio fields instead of Dropdown for Post Format selection.

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

The topic ‘Conditional logic and action hook?’ is closed to new replies.