Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save phillipwilhelm/3b5ae9ba51fc84a34a78757caabf3fbc to your computer and use it in GitHub Desktop.
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?
<?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'
) );
<?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'
) );
}
<?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