wpcf7_tag_generator_submit

The Contact Form 7 wpcf7 tag generator submit function.

Description

wpcf7_tag_generator_submit( $contact_form, (string) $args = '' ); 

Parameters (2)

0. $contact_form
The contact form.
1. $args — Optional. (string) => ''
The args.

Usage

  1. if ( !function_exists( 'wpcf7_tag_generator_submit' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-7/modules/submit.php'; 
  3.  
  4. // The contact form. 
  5. $contact_form = null; 
  6.  
  7. // The args. 
  8. $args = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = wpcf7_tag_generator_submit($contact_form, $args); 
  12.  

Defined (1)

The function is defined in the following location(s).

/modules/submit.php  
  1. function wpcf7_tag_generator_submit( $contact_form, $args = '' ) { 
  2. $args = wp_parse_args( $args, array() ); 
  3.  
  4. $description = __( "Generate a form-tag for a submit button. For more details, see %s.", 'contact-form-7' ); 
  5.  
  6. $desc_link = wpcf7_link( __( 'https://contactform7.com/submit-button/', 'contact-form-7' ), __( 'Submit Button', 'contact-form-7' ) ); 
  7.  
  8. ?> 
  9. <div class="control-box"> 
  10. <fieldset> 
  11. <legend><?php echo sprintf( esc_html( $description ), $desc_link ); ?></legend> 
  12.  
  13. <table class="form-table"> 
  14. <tbody> 
  15. <tr> 
  16. <th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-values' ); ?>"><?php echo esc_html( __( 'Label', 'contact-form-7' ) ); ?></label></th> 
  17. <td><input type="text" name="values" class="oneline" id="<?php echo esc_attr( $args['content'] . '-values' ); ?>" /></td> 
  18. </tr> 
  19.  
  20. <tr> 
  21. <th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-id' ); ?>"><?php echo esc_html( __( 'Id attribute', 'contact-form-7' ) ); ?></label></th> 
  22. <td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-id' ); ?>" /></td> 
  23. </tr> 
  24.  
  25. <tr> 
  26. <th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-class' ); ?>"><?php echo esc_html( __( 'Class attribute', 'contact-form-7' ) ); ?></label></th> 
  27. <td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-class' ); ?>" /></td> 
  28. </tr> 
  29.  
  30. </tbody> 
  31. </table> 
  32. </fieldset> 
  33. </div> 
  34.  
  35. <div class="insert-box"> 
  36. <input type="text" name="submit" class="tag code" readonly="readonly" onfocus="this.select()" /> 
  37.  
  38. <div class="submitbox"> 
  39. <input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr( __( 'Insert Tag', 'contact-form-7' ) ); ?>" /> 
  40. </div> 
  41. </div> 
  42. <?php