It can be used for pre-filled fields or custom functionality with filterning and updating values.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
function wpm_custom_date_shortcode_handler($tag) { if ( ! is_array( $tag ) ) return ''; $name = $tag['name']; if ( empty( $name ) ) return ''; $next_week = date('Y-m-d', time() + (60*60*24*7)); $html = '<input type="text" name="' . $name . '" value="' . $next_week . '" />'; return $html; } wpcf7_add_shortcode( 'custom_date', 'wpm_custom_date_shortcode_handler', true ); |