Forum Replies Created
-
AuthorPosts
-
June 10, 2019 at 5:01 PM in reply to: โ Allow editing form data which is submitted by "that" author #14912
nfyp145
ParticipantWow...
That works beautifully. You really are the code poet.
Thank you so much Master Ahn.
June 10, 2019 at 12:23 PM in reply to: โ Allow editing form data which is submitted by "that" author #14908nfyp145
ParticipantBut after adding code from step 2...
the form page (where I insert form shortcode) is blocked with message - You are not allowed to edit this post.
So there is no chance for guest or subscriber to submit form.
June 10, 2019 at 11:13 AM in reply to: โ Allow editing form data which is submitted by "that" author #14903nfyp145
ParticipantHello Anh
Appreciate for reply! I've been waiting for your solution all day - today.
I try as you guided above.
After adding snippets from step 1 and 2 in functions.php, ONLY admin can see and submit the form.
nfyp145
ParticipantHi Tran...
Not grouping fields via UI.
Grouping fields (each field) under one special field. Under one roof.
- main_id * text_field_id * image_field_id * slider_field_id * time_field_id ...That way, it'd a lot easier when naming all IDs.
And also, the dev just needs to focus on (main_id) when getting value.For example,
/* Post Meta Box */ add_filter('rwmb_meta_boxes', 'set_post_meta_box'); function set_post_meta_box($meta_boxes) { $meta_boxes[] = array( 'id' => 'post_meta_box', 'post_types' => 'post', 'tab_style' => 'left', 'tabs' => array( 'box_1_tab' => 'Box 1', 'box_2_tab' => 'Box 2', ), 'title' => 'Post Meta Box', 'fields' => array( /* Box 1 */ array( 'id' => 'box_1', 'tab' => 'box_1_tab', 'type' => 'special_fieldset', 'fields' => array( array( 'id' => 'title', 'name' => 'Title', 'type' => 'text', ), array( 'id' => 'description', 'name' => 'Description', 'type' => 'textarea', ), ), ), /* Box 2 */ array( 'id' => 'box_2', 'tab' => 'box_2_tab', 'type' => 'special_fieldset', 'fields' => array( array( 'id' => 'title', // Same ID from Box 1 'name' => 'Title', 'type' => 'text', ), array( 'id' => 'description', // Same ID from Box 1 'name' => 'Description', 'type' => 'textarea', ), ), ), ), ); return $meta_boxes; }To return values...
$box_1 = rwmb_meta('box_1'); $box_1_title = $box_1['title']; $box_1_description = $box_1['description']; $box_2 = rwmb_meta('box_2'); $box_2_title = $box_2['title']; $box_2_description = $box_2['description'];Without defining long ID names for each field,
the dev can return values for Title and Description just usingbox_1andbox_2IDs.nfyp145
ParticipantOf course, I'm using "MB Group" to group different fields. It works well so far.
array( 'id' => 'my_content', 'collapsible' => true, 'group_title' => 'My Content', 'type' => 'group', 'fields' => array( array( 'id' => 'title', 'name' => 'Title', 'type' => 'text', ), array( 'id' => 'subtitle', 'name' => 'Subtitle', 'type' => 'textarea', ), array( 'id' => 'image', 'name' => 'Image', 'type' => 'image', ), array( 'id' => 'content', 'name' => 'Content', 'type' => 'wysiwyg', ), ), ),But I'd like to use "MB Group" for specific tasks - such like collapsible, cloneable, sortable...
Could it be nice having a field type (only) for grouping different custom fields? That way, it'll help reducing server load.
Thanks again Tran!
nfyp145
ParticipantHi Anh
Received update alert from GitHub. And tested the background field. It works perfectly!
Thank you very much!
Happy New Year to you and your team.
nfyp145
ParticipantThanks much Tran. That will be awesome!
nfyp145
ParticipantSorry for late confrim.
It works well now. Thank you so much and appreciate for the fix.
Happy Holidays Tan!
nfyp145
ParticipantAppreciate for the reply Tan.
Eagerly Waiting...
-
AuthorPosts