Forked from spivurno/gw-documentation-multiple-instances-of-class-same-form.php
Created
September 5, 2016 04:07
-
-
Save phillipwilhelm/3b5ae9ba51fc84a34a78757caabf3fbc to your computer and use it in GitHub Desktop.
Gravity Wiz // Documentation // FAQ // How do I apply a class-based snippet to different forms?
This file contains 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 | |
new GW_Sample_Class( array( | |
'form_id' => 1, | |
'target_field_id' => 7, | |
'modifier' => '+1 year' | |
) ); | |
new GW_Sample_Class( array( | |
'form_id' => 1, | |
'target_field_id' => 3, | |
'modifier' => '+1 week' | |
) ); |
This file contains 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 | |
foreach( array( 1, 2, 3 ) as $form_id ) { | |
new GW_Sample_Class( array( | |
'form_id' => $form_id, | |
'target_field_id' => 7, | |
'modifier' => '+1 year' | |
) ); | |
} |
This file contains 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 | |
new GW_Sample_Class( array( | |
'form_id' => 1, | |
'target_field_id' => 7, | |
'modifier' => '+1 year' | |
) ); | |
new GW_Sample_Class( array( | |
'form_id' => 2, | |
'target_field_id' => 3, | |
'modifier' => '+1 week' | |
) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment