Forum Replies Created
-
AuthorPosts
-
December 3, 2019 at 3:43 PM in reply to: โ Labels should include required info, when it's a required field #17319
flowdee
ParticipantPerfect, thanks!
December 2, 2019 at 3:39 PM in reply to: โ Labels should include required info, when it's a required field #17283flowdee
ParticipantTemporarily solved it wthis way:
/** * Maybe add required span to labels */ add_filter( 'rwmb_begin_html', function ( $begin, $field, $meta ) { if ( is_admin() ) return $begin; if ( ! empty ( $field['required'] ) ) { $begin = str_replace( '</label>', '<span class="req">*</span></label>', $begin ); } return $begin; }, 10, 3 );Additional question: Tried to apply this hook only to the frontend submission fields, by using filters/prefixes like
rwmb_frontend_begin_html,mb_frontend_begin_html,rwmb_mb_frontend_begin_htmlbut none of them worked.March 26, 2018 at 7:38 PM in reply to: type="post" / field_type="checkbox_list" returns only single id #8962flowdee
ParticipantNope. It's directly executed in the functions.php of a theme
March 24, 2018 at 2:41 PM in reply to: type="post" / field_type="checkbox_list" returns only single id #8944flowdee
ParticipantMh I'm registering the metaboxes as follows:
add_filter( 'rwmb_meta_boxes', function( $meta_boxes ) { ... }
flowdee
Participant+1 for ajax
flowdee
Participant[mb_frontend_form id="Meta box ID" post_fields="thumbnail"]
flowdee
ParticipantYep fixed, thanks!
Unfortunately a following issue: https://support.metabox.io/topic/post-thumbnail-not-deletable/
flowdee
ParticipantYeah indeed what assumed ๐
Maybe it would be too complicated on a shortcode basis, especially when adding descriptions for multiple fields.
What you would provide a filter loops through all "post_fields". This way we could easily hook into and add a custom description as well as the required attribute mentioned in another ticket.
Here's a piece of "pseudo code":
$post_field = array( 'key' => 'title, 'label' => 'Title', 'description' => '', 'required' => false );The filter could either be applied on every single field or on a array holding all fields which are "activated" through the shortcode.
Hope you got what I mean ๐
flowdee
ParticipantThanks, this helps!
PS: I think the more perfect way would be to add getter methods, but it's fine for me too.
-
AuthorPosts