Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi, please use “std” parameter.
Anh Tran
KeymasterHi Hazmi, sorry for the delay in replying.
The
image_advancedfields loads saved value via ajax request, so it takes a little time. Only when it's loaded, the field inputs are added. So, please don't update the post before it finishes loading (in that case all inputs are not fully added, and updating will make the post lost saved values).February 13, 2018 at 10:05 PM in reply to: Conditional logic not working with clones in groups #8545Anh Tran
KeymasterI got it. In this case, please add
'clone_default' => trueto the field and thestdvalue will be cloned, too.Anh Tran
KeymasterHello,
The logic should work. There is just a small typo in your code. In the response, the param should be
idinstead ofid:.However, loading selected posts to show after updating is the next problem. We need to update
optionsparameter to make the field renders properly. So, I added 2 more functions to get the saved data and put them in theoptions:February 13, 2018 at 10:43 AM in reply to: Conditional logic not working with clones in groups #8539Anh Tran
KeymasterI got it. The problem is the cloning "radio" field. I've fixed it here. Please try and let me know how it goes.
Thanks
Anh Tran
KeymasterHi Martin,
Sorry for the confusion. The Builder extension is behind some extensions and we're updating it to catch the others. Specifically:
- The validation module has not yet been added to the Builder. You can do that via the Custom Attributes for meta box (via the Settings tab) like this:
https://imgur.elightup.com/MQsvIfq.png
It's not intuitive yet. But it should works (you can verify by seeing the exported Code). Here is the guide to work with custom attributes (written for field settings, but also works for meta box settings).
- Regarding "Why could MB Frontend not allow in the visual interface to select post_title and post_excerpt", my first attempt to build the extension is to make it also work with existing meta box in the backend, where post fields already exist. Adding post fields to the form will duplicate them in the backend. So, they must be removed somehow.
Anyway, can you send me an admin account to check why the code doesn't work via contact form?
Thanks,
AnhAnh Tran
KeymasterI found the problem. The Conditional Logic applies CSS (
display: block) inline to the field, which overwrites the CSS of the Group extension (collapsed state). I've just updated the Group extension. Please try and let me know how it goes.Anh Tran
KeymasterPlease add the validation rules to the meta box code exported from the Builder extension. Here is the code:
And the code to show form is just:
$form = '[mb_frontend_form id="question" post_fields="title" submit_button="Submit Question" confirmation="Thank you for submitting your question, which will be addressed shortly!"]'; echo do_shortcode( $form );Anh Tran
KeymasterI checked on Windows with XAMPP and didn't see this bug. Probably the PHP version. Which version are you using?
Anyway, I've just added a fix for that. We're working on some other issues and will release the new version when it's done.
Anh Tran
KeymasterHi Martin,
You can add validation rules for post title, just like normal custom fields:
$meta_boxes[] = [ 'title' => 'Simple form', 'id' => 'simple-form', 'fields' => [], // Your fields 'validation' => [ 'rules' => [ 'post_title' => [ 'required' => true, 'minlength' => 5, ], ], ], ];See more validation rules.
Anh Tran
KeymasterHello,
First of all, thank you for trying Meta Box. I'm sorry that you had difficulties using it. Can you please clarify your concerns so that I can help you more closely? For example: what fields do you want to create, with what conditions, or which part of the documentation is vague? I will try my best to help you.
I see you bought only the Builder extension. There are some features such as conditional display meta boxes for a specific page template or display it for terms, and they need some other extensions to work. Besides, the approach in the Builder extension is somewhat different from ACF, so maybe something is not the same.
I hope you can give us the chance to help you.
Thank you.
Anh Tran
KeymasterI guess we have some misconception about "template". The template that plugin provides is the "text" version of the meta box settings, which is different from the page template that you imagine in the frontend. Am I correct?
Anh Tran
KeymasterOh, I see. My previous reply was for another problem (show/hide the image/video field when selecting an option). I'll check this bug and reply soon.
Anh Tran
KeymasterHello,
Yes, you can. Just create different meta boxes for different pages. You might want to use the MB Include Exclude to show specific meta boxes for a specific page. This extension works well with the MB Template extension.
Anh Tran
KeymasterHello,
Your question is about the Frontend Submission extension, so I moved it to the corresponding forum.
Regarding the HTML markup of uploaded images, we mimic the markup in the Media Library in the admin area, which looks like this:
https://imgur.elightup.com/WimQaQC.png
Although there are some redundant
div, it doesn't affect your style very much. However, you still need to add some CSS to make it looks seamless with your theme. -
AuthorPosts