10/19/2017 at 12:26 pm
#438302
Keymaster
@ Randy
So, you need the field in the form, but hidden, correct? Untested but you should be able to this…
Change the field type from text to hidden in your existing code.
Add the code to the snippet:
add_action( 'cn_meta_field-hidden', 'cn_register_custom_hidden_field', 10, 3 );
function cn_register_custom_hidden_field( $field, $value, $entry ) {
cnHTML::input(
array(
'type' => 'hidden',
'prefix' => '',
'class' => '',
'id' => $field['id'],
'name' => $field['id'],
'readonly' => isset( $field['readonly'] ) && TRUE === $field['readonly'] ? TRUE : FALSE,
'before' => '',
'after' => '',
),
$value
);
}
Hope that helps, let me know.
