Support Forum
Did you have anoter Group field or other Meta Boxes?
If it is to hard, or beyond the scope of support to help me out, just let me know, no probs
Thank You for everything so far, I do appreciate your time.
Jon
Hi Jon, I found another problem on your code:
// start customer
$meta_boxes[] = array(
You can remove [], it just $meta_box.
On step value, can you please change to full value contains zero sign, 0.01 instead of 'step' => .01?
If you still get error, try to comment out some other Meta Box (I though is Groups), to check what meta boxes generate error 🙂
removing square brackets, [] breaks my site completely
I means only remove square bracket only with $meta_box below, like my example in the previous page.
// start customer
Warning: Illegal string offset 'title' in C:\wamp\www\wordpress\wp-content\plugins\project52\plugins\meta-box\inc\meta-box.php on line 343
Warning: Invalid argument supplied for foreach() in C:\wamp\www\wordpress\wp-content\plugins\project52\plugins\meta-box\inc\meta-box.php on line 386
Warning: Invalid argument supplied for foreach() in C:\wamp\www\wordpress\wp-content\plugins\project52\plugins\meta-box\inc\meta-box.php on line 150
Dont mind the errors, it is because I removed the square brackets, but left it as
// start customer
$meta_boxes = array(
instead of
// start customer
$meta_box = array(
Oh, sorry, remove the square bracket and keep it $meta_box because I have assign $meta_boxes[] = $meta_box later 😉
Fixed the errors, but my phone field still doesnt appear
Ok, the new phone text input area is pulling the correct id: p52_quote_phone_3722 (with 3722 being the select contact post ID), however it is not displaying any value
here is how I have all my contact metaboxes setup..No boxes appear until I select a name, and then they all become visible under the "New" inputs ie this email
// Show this email field if match name.
$meta_box['fields'][] = array(
'name' => 'New Email',
'id' => $prefix . 'email_' . $customer->ID,
'type' => 'text',
'std' => get_post_meta( $customer->ID, 'p52_quote_email', true ),
'visible' => array( $prefix . 'name', $customer->ID ),
'columns' => 6
);
This is the full contact php
so the question becomes, why is it displaying with no value?
<input type="text" class="rwmb-text" name="p52_quote_phone_3762" id="p52_quote_phone_3762" value="" placeholder="" size="30">
Can you please check the database (wp_postmeta) to see the records exists here?
Basically, it grabs value from postmeta table and bind to meta box as I defined in this line:
'std' => get_post_meta( $customer->ID, 'p52_quote_phone', true ),
So if the customer has phone entered, this should be bound to field via std
key.
I'm very happy to see you're going to the last steps 🙂 This is a great challenge 😀
yes they are in the database eg
meta_id: 943
post_id: 3722
meta_key: p52_contact_phone
meta_value: 123456789