Problem:
The user changes an email input from type=text to type=email to leverage browser validation. But, then the field does not handle the backspace key to delete a string.
Problem:
Can not see Featured Image field with post type I've created
Solution:
To enable the Featured Image, you need to Go to:
Toolset => Post Types => Edit your desired Post Type => Within the section "Sections to display when editing " checkmark the checkbox "Featured Image" and save your post type.
Problem: I have two custom fields in a post type. When a Form is submitted to create posts, I would like to automatically populate one of the custom fields using information from the other custom field to generate an HTML link tag.
Solution: Use the cred_save_data hook to trigger your own custom code when a Form is submitted.
add_action('cred_save_data', 'tssupp_autopopulate_html',10,2);
function tssupp_autopopulate_html($post_id, $form_data)
{
$forms = array( 123, 456 );
$input_slug = 'your-input-field-slug';
$destination_slug = 'your-destination-field-slug';
// if this hook is fired when submitting any of the forms in $forms
if ( in_array( $form_data['id'], $forms ) )
{
// if input field has content, build the HTML string and save it in destination field
if (isset($_POST['wpcf-' . $input_slug]))
{
$input = $_POST['wpcf-' . $input_slug];
$content = '<a href="' . $input . '">' . $input . '</a>';
update_post_meta($post_id, 'wpcf-' . $destination_slug, $content);
}
}
}