Forum Replies Created
-
AuthorPosts
-
Content Pilot
ParticipantLong, you can close this ticket. Another badly closed form tag was deleting the form that is rendered inside the block without further clues. Thanks
Content Pilot
ParticipantSure,
You can take the extension example code, even without fields. Just add a
<form></form>in the template file.add_filter( 'rwmb_meta_boxes', function( $meta_boxes ) { $meta_boxes[] = [ 'title' => 'Hero Content', 'id' => 'hero-content', 'description' => 'A custom hero content block', 'type' => 'block', 'icon' => 'awards', 'category' => 'layout', 'context' => 'side', 'render_template' => get_template_directory() . '/blocks/hero/template.php', ]; return $meta_boxes; } );template.php
echo '<div><form><button>Label</button></form></div>';Using
render_callbackdoesn't make a difference.Content Pilot
ParticipantThanks for this information Long. We had it working fine for a long time until this last update of that plugin. I switch the field type and everything works like in the past. Thank you for the help. Please close this ticket.
Content Pilot
ParticipantI'm trying to leave a comment and after a certain amount of characters I get "Error: Your reply cannot be edited at this time."
September 15, 2020 at 9:08 PM in reply to: ✅Remove accessibility carets on metaboxes after WordPress 5.5.0 updates #21886Content Pilot
ParticipantThanks for starting a feature request.
Content Pilot
ParticipantHi,
Do you have any updates on this? Or is it on your roadmap for sometime this year?
Thank you
Content Pilot
ParticipantI follow this tutorial and created my own field--License. It is a password input but saves as normal text in the admin.
https://docs.metabox.io/custom-field-type/
if ( class_exists( 'RWMB_Field' ) ) { /** * Metabox Field * * Create new field to store access token in admin. *<br /> * Obfuscates the view to the end user but saves as plain text in the database. * * @since 5.1.0 */ class RWMB_License_Field extends RWMB_Field { /** * Render the field * * @param string $meta Value from input. * @param array $field Field data. * @return string * @since 5.1.0 */ public static function html( $meta, $field ) { return sprintf( '<input type="password" name="%s" id="%s" value="%s" size="%s">', $field['field_name'], $field['id'], $meta, $field['size'] ); } } }Content Pilot
ParticipantI would really appreciate if we could have the option to save as array or string. When we release new versions of our plugin, sometimes we run database updates which are MUCH easier when values live inside single cells, not arrays. I understand WordPress is trying to set a standard to not overload the database. But if you know what you are doing, then there should be an option to have it another way.
Thanks for adding it to the roadmap.
Content Pilot
ParticipantThanks, Ahn.
That's the extra info that I needed to know about.
Glad it's on your radar although it might not be tackled very soon.
You can close this ticket.
Content Pilot
ParticipantThis setup works on the plugin I have built. The failure was coming from another plugin that loads that plugin. Chaining them.
I had to add
"minimum-stability": "dev"to my new composer.json and it works now.Please close.
Content Pilot
ParticipantI understand how to work with Composer. And we use it all of the time on our projects. That is why I am making a proposal, not asking for help or support. I think Metabox would benefit from switching to semantic versioning to be more in line with Composer's best practices. I urge you to reconsider or to at least have a conversation about what it would take.
Content Pilot
ParticipantThanks Long. I already looked at the code and that is why I reached out. I know how it works. What I am asking if it can work differently for
selectselect_advancedtaxonomyandtaxonomy_advancedfields. If there was a clause in the output of the value to do database lookup of the term label, that would be a major improvement from listing a term ID. An average user does not know what a term ID is.Content Pilot
ParticipantAlso changing just a relationship should trigger the creation of a revision if that's possible from the plugin.
Content Pilot
ParticipantThat would be great, thank you.
Content Pilot
Participant@Comsi. bless you. it's always the cache, isn't it?
-
AuthorPosts