Forum Replies Created
-
AuthorPosts
-
Rebecca Robertson
ParticipantThank you, Peter.
I'm already using the select field for content_type in my form, it's just that all of my posts are being saved as standard posts, which is the bit of nuisance I'm trying to clear up.Your code looks like it should meet my needs, but let me make certain I have this correct, as my PHP is not nearly as good as I wish it were.
As I gave the post types and the content types the same name but not the same slugs, let's assume I have two post types, Flora(flora-post) and Fauna(fauna-post), with corresponding content_type terms Flora(flora-post-type) and Fauna(fauna-post-type) would I do this:
add_action( 'rwmb_frontend_after_process', function( $config, $post_id ) { if ( isset( $_POST['flora-post-type'] ) ) { $post_type = $_POST['flora-post']; $my_post = [ 'ID' => $post_id, 'post_type' => $flora-post ]; wp_update_post( $my_post ); } else if ( isset( $_POST['fauna-post-type'] ) ) { $post_type = $_POST['fauna-post']; $my_post = [ 'ID' => $post_id, 'post_type' => $fauna-post ]; }, 10, 2 );Rebecca Robertson
ParticipantSorry, this topic is also very similar to what I want to do. Again, how would I change the code to work for my needs?
January 13, 2025 at 12:07 AM in reply to: ✅Set Default Term for Specific Post Submission Form #47377Rebecca Robertson
ParticipantFor others still looking for an answer here, this topic might help. I haven't tried it yet, but it seems to be better explained.
January 12, 2025 at 11:56 PM in reply to: ✅Set Default Term for Specific Post Submission Form #47376Rebecca Robertson
ParticipantSince the code given doesn't work, is it possible to use a hidden field? Since the documentation on hidden fields is limited and vague, can someone please explain how to set a category in a hidden field?
Rebecca Robertson
ParticipantThat would be great, unfortunately, none of CSS styling I've tried has worked and I'm pretty experienced with CSS.
Rebecca Robertson
ParticipantThis feature is definitely needed.
December 10, 2024 at 7:27 PM in reply to: ✅Set Default Term for Specific Post Submission Form #47152Rebecca Robertson
ParticipantPlease, are there any other ideas for this? I would really like to be able to make this work.
December 10, 2024 at 7:17 PM in reply to: [Feature Request] Conditionally Set Value Of Field Based On Value Of Another #47151Rebecca Robertson
ParticipantAdd my +1 for this feature.
Rebecca Robertson
ParticipantThank you, I think this would be an awesome addition.
I also think it would be nice if you could add more granular conditional logic choices that not only allowed you to show a particular field based on another field, but also to show or select specific options within that field (specifically select fields). For instance: if select field fruit option = apple then select field color options = red, green, yellow, but if select field fruit option = grape then select field color options = red, green, yellow, purple.
October 30, 2024 at 10:39 PM in reply to: ✅Set Default Term for Specific Post Submission Form #46790Rebecca Robertson
ParticipantStill no joy with this.
Rebecca Robertson
ParticipantBut can I make them horizontal instead?
Rebecca Robertson
ParticipantThank you!
October 18, 2024 at 8:14 PM in reply to: [Feature Request] Conditionally Set Value Of Field Based On Value Of Another #46720Rebecca Robertson
ParticipantWe definitely need this functionality.
Several of my forms would be greatly improved and simplified if I had the ability to say "if taxonomy 1 = A then taxonomy 2 = B" or "if taxonomy 1 = B then taxonomy 2 includes C, D, E and F".
Rebecca Robertson
ParticipantThank you.
Rebecca Robertson
ParticipantAwesome! Thank you!
-
AuthorPosts