This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action( 'gform_after_submission_n', 'wpdoin_after_submission_add_n_form_submission', 10, 2 ); | |
| /** | |
| * Create a submission associated with the XYZ form, upon submitting the form with ID N. I.e. use the N form values to populate | |
| * the XYZ form entries. | |
| * | |
| * @hook gform_after_submission_x | |
| */ | |
| function wpdoin_after_submission_add_n_form_submission( $entry, $form ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** this part of the code makes the background of our template yellow **/ | |
| .c-custom-template-wrap--yellow .wpcf7-form-control-wrap input, | |
| .c-custom-template-wrap--yellow .wpcf7-form-control-wrap textarea, | |
| .c-custom-template-wrap--yellow .wpcf7-submit { | |
| background-color: #ffffd5; | |
| color: black; | |
| } | |
| /** this part of the code, divides the HTML elements into two groups **/ | |
| .c-custom-template-wrap .c-custom-template { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** this part of the code makes the background of our template blue **/ | |
| .c-custom-template-wrap--blue { | |
| background-color: #338cd0; | |
| padding: 20px; | |
| border-radius: 20px; | |
| } | |
| /** this part of the code, divides the HTML elements into two groups **/ | |
| .c-custom-template-wrap .c-custom-template { | |
| display: grid; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="c-custom-template-wrap c-custom-template-wrap--blue"> | |
| <div class="c-custom-template"> | |
| <div class="c-custom-template__col"> | |
| <label> Your name | |
| [text* your-name akismet:author autocomplete:name] </label> | |
| <label> Your email | |
| [email* your-email akismet:author_email autocomplete:email] </label> | |
| </div> | |
| <div class="c-custom-template__col"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action( 'gform_after_submission', 'gf_set_country_field_value', 10, 2 ); | |
| /** | |
| * Set the field value of the user country field | |
| * | |
| * @hook gform_after_submission | |
| **/ | |
| function gf_set_country_field_value( $entry, $form ) { | |
| $ip = rgar( $entry, 'ip' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .c-grid { | |
| display: grid; | |
| grid-template-columns: 50% 50%; | |
| gap: 10px; | |
| } | |
| .c-grid--three { | |
| grid-template-columns: 33% 33% 33%; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="c-grid"> | |
| <div> | |
| <label> Name* | |
| [text* your-name akismet:author autocomplete:name] </label> | |
| </div> | |
| <div> | |
| <label> Email* | |
| [email* your-email akismet:author_email autocomplete:email] </label> | |
| </div> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .wpcf7-styled { | |
| padding: 25px; | |
| background: #fafafa; | |
| border-radius: 25px; | |
| } | |
| .wpcf7-styled .wpcf7-radio input[type="radio"] { | |
| display: none; | |
| opacity: 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .wpcf7-styled { | |
| padding: 25px; | |
| background: #fafafa; | |
| border-radius: 25px; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <h4> About You </h4> | |
| <label> Name* | |
| [text* your-name akismet:author autocomplete:name] </label> |
NewerOlder