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 | |
/** | |
* Require All Columns of List Field | |
* http://gravitywiz.com/2012/07/23/require-all-columns-of-list-field/ | |
*/ | |
add_filter('gform_validation', 'gwiz_require_all_list_columns'); | |
function gwiz_require_all_list_columns($validation_result) { | |
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 | |
/** | |
* Simple Ticket Inventory with Gravity Forms / Limit by Sum of Field Values | |
* http://gravitywiz.com/2012/05/19/simple-ticket-inventory-with-gravity-forms/ | |
*/ | |
$sum_form_id = 86; | |
$sum_field_id = 14.3; | |
$sum_limit = 450; |
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
$sum_limit_message = '<div style="border: 1px solid #e6db55; background-color: #FFFFE0; padding: 10px;">Sorry, this show is sold out.</div>'; |
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
switch($values[0]) { | |
case 'Basic Package': | |
$post_data['post_status'] = 'draft'; | |
break; | |
case 'Premium Package': | |
$post_data['post_status'] = 'publish'; | |
break; | |
} |
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
// register field IDs 1 and 2 on form ID 8 | |
register_confirmation_fields(8, array(1, 2)); | |
// register field IDs 12 and 14 on form ID 2 | |
register_confirmation_fields(2, array(12, 14)); |
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
$from_name = 'Your Name'; | |
$from_email = 'your@email.com'; | |
$subject = 'Your Subject Here'; | |
$message = 'Your message here.'; |
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
$from_name = 'Your Name'; | |
$from_email = 'your@email.com'; | |
$subject = 'Your Subject Here'; | |
$message = 'Your message here.'; |
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
$form_id = 5; | |
$entries_left_message = 'Only %s positions left!'; | |
$form = RGFormsModel::get_form_meta($form_id); | |
$entry_count = RGFormsModel::get_lead_count($form['id'], ''); | |
$entries_left = $form["limitEntriesCount"] - $entry_count; | |
printf($entries_left_message, $entries_left); |
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
$custom_field_name = 'author_email'; |
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
$form_id = 156; | |
$form = RGFormsModel::get_form_meta($form_id); | |
$entry_count = RGFormsModel::get_lead_count($form['id'], ''); | |
$entries_left = $form["limitEntriesCount"] - $entry_count; | |
if($entries_left > 0): ?> | |
<p>There are <?php echo $entries_left; ?> spots available!</p> | |
<p><a href="/beta-sign-up/">Sign Up Now!</a></p> | |
<?php else: ?> |