Forum Replies Created
-
AuthorPosts
-
January 28, 2023 at 4:11 AM in reply to: Custom input method for hierarchical taxonomy associated with custom post #40324
Scott Brim
ParticipantOops In "Checkbox list works, but with a lot of terms it overwhelms the rest of the input form", I meant Checkbox Tree. Thanks.
Scott Brim
Participantfyi I finally used
form.mbup-form div.rwmb-meta-box:first-of-type > h2 { display:none !important; }Scott Brim
ParticipantWhat's the best way to upvote this? This problem caused me to abandon using Meta Box for user registration. I don't want to have to maintain alternative code.
Scott Brim
ParticipantNo. I would have done something like that but the reason for it evaporated. I don't think that code worked anyway.
Scott Brim
ParticipantScott Brim
ParticipantI was still learning MB. It was simple. In the field group, you can have a field for post.title directly.
Scott Brim
ParticipantThank you. Done. You might consider adding a "heading" attribute to the shortcode.
August 6, 2022 at 3:53 AM in reply to: Front end forms, taxonomy fields, and entering multiple new terms #37376Scott Brim
ParticipantWhat we did eventually was to add all of the taxonomy terms we thought would be useful in the admin, before opening it up.
Scott Brim
ParticipantYou can close this. I figured it out. I'm traveling so I'm testing on a Chromebook, and it doesn't allow me to set the permalinks reasonably. Thanks for listening.
June 16, 2022 at 2:28 AM in reply to: ✅Use rwmb_show comparing user capability and post field #36515Scott Brim
ParticipantFYI this is resolved, but I ended up using include/exclude. I split my field group in two, converted one of the field groups to PHP, and added an
includeparameter. Then I set the View to generate the form including both field groups. It all makes sense now and it seems easy. I appreciate your patience with someone who is new to MB.June 10, 2022 at 6:43 PM in reply to: ✅Use rwmb_show comparing user capability and post field #36432Scott Brim
ParticipantThank you. Sorry, but I don't see a way to use Conditional Logic to check against a user attribute. I'm going to simplify my question. In a form, I would like to show the field only if the user is admin or editor.
Apparently conditional logic in the Builder can only check fields in the field group - I see no way to match against a user role/capability. If I create the field group using code, I have more freedom, but even then, https://docs.metabox.io/extensions/meta-box-conditional-logic/#with-code doesn't show a way to compare with User role or capability.
So, in short: is there a way to check user role or capability, either in Conditional Logic or when registering a meta box with code? Alternatively, is there a filter I can use to decide whether or not to show a specific field?
Thank you for your patience. I'm reading and testing as fast as I can to learn. While I wait for your answer I'll investigate template parts and having multiple meta boxes in a form.
June 10, 2022 at 2:17 AM in reply to: ✅Use rwmb_show comparing user capability and post field #36405Scott Brim
ParticipantSorry, I mixed things up there.
add_filter( "rwmb_show_minimum_required_role", function( $show, $meta_box ) { if ( ! current_user_can( rwmb_get_value( 'minimum_required_role' ) ) ) { $show = false; } return $show; } -
AuthorPosts