Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi mendio,
Yes, you can do that using the
rwmb_{$field_id}_valueandrwmb_{$field_id}_metafilters (see this documentation) to change the displayed value and saved value. Here is the sample code:add_filter( 'rwmb_ID_value', function( $value ) { return date( 'Y-m-d', strtotime( $value ) ); } ); add_filter( 'rwmb_ID_meta', function( $value ) { return date( 'd-m-Y', strtotime( $value ) ); } );Don't forget to change
IDto your field ID.September 13, 2015 at 11:13 PM in reply to: WSYIWYG seems to be broken when using groups - sorry to reopen #1434Anh Tran
KeymasterI received your email and replied. Please look at the email.
Anh Tran
KeymasterGlad to hear it's fixed!
Thanks for using Meta Box.
September 10, 2015 at 10:46 AM in reply to: Radio buttons not rendering/their value isn't recorded #1409Anh Tran
KeymasterThis is weird, please send me info (same as in the another ticket) so I can look into it for you.
September 10, 2015 at 10:45 AM in reply to: WSYIWYG seems to be broken when using groups - sorry to reopen #1408Anh Tran
KeymasterHi, please send me info in the Contact page. I will look at the issue for you ๐
Anh Tran
KeymasterHi bravebits,
Does the answer in the topic https://support.metabox.io/topic/how-to-make-conditional-logic-for-image-upload/ solve your problem? My developer tested with similar code and said it was working.
Regarding your code above, what is your
$prefix? Is itwr?Anh Tran
KeymasterI think the best way to do that is via CSS. You can install a plugin like Add admin CSS. The CSS to make each label display in ins own line is quite simple:
.rwmb-radio-wrapper .rwmb-input > label { display: block; }If you don't want to use a plugin, you can enqueue a CSS file on Add new/Edit page with the same snippet above.
This way you also can add more margin to label for a better look.
But if you have to use PHP to output line break after each label tag, please use
rwmb_radio_htmlfilter, like this:add_filter( 'rwmb_radio_html', function html( $output, $field, $meta ) { $html = array(); $tpl = '<label><input type="radio" class="rwmb-radio" name="%s" value="%s"%s> %s</label>'; foreach ( $field['options'] as $value => $label ) { $html[] = sprintf( $tpl, $field['field_name'], $value, checked( $value, $meta, false ), $label ); } return implode( '<br>', $html ); }, 10, 3 );Anh Tran
KeymasterHi Jon, let me ask my developer if he is interested in working freelance with you on that project and will reply you via email.
Thanks.
Anh Tran
KeymasterHi Maurice,
If you want to display meta value in a template file like
single.php, please open that file (notfunctions.php) and insert the following code at the place you want to show the value:echo rwmb_meta( 'FIELD_ID', 'type=FIELD_TYPE' );Don't forget to change
FIELD_IDandFIELD_TYPEto your specific field ID and field type.Anh Tran
KeymasterHi Jan,
You can try the Include Exclude extension. It supports restricting by user role or by user ID and many other conditions.
Anh Tran
KeymasterHi, you can use the field type
oembed, it allows you to add an URL from Youtube, Vimeo and other rich-content websites.Anh Tran
KeymasterHi carassius,
Yes, you're right about using Conditional Logic extension. It's made exactly for this purpose. Please try it and let us know if it works for you.
Thanks.
Anh Tran
KeymasterGreat that it works for you now. I will check the number of available updates and will update the Updater as soon as possible.
Thanks for letting me know ๐
Anh Tran
KeymasterPlease try again, I uploaded the wrong file to server ๐
Anh Tran
KeymasterHi Piet,
I've just updated the Updater extension. Now it works with Conditional Logic. Please update the Updater (using itself) and then you can see the new versions of Conditional Logic.
Sorry for this inconvenience.
-
AuthorPosts