Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class GPNF_Map_Child_Entries_To_ACF_Repeater {
public function __construct( $args ) {
$this->_args = wp_parse_args( $args, array(
'form_id' => false,
'nested_form_field_id' => false,
'nested_form_field_id' => false,
'field_map' => array(),
'acf_repeater_field_name' => false,
) );
Expand Down Expand Up @@ -42,15 +42,15 @@ function gw_child_entries_to_repeater( $post_id, $feed, $entry, $form ) {
update_field( $this->_args['acf_repeater_field_name'], $repeat_value, $post_id );
}
}
}
}

new GPNF_Map_Child_Entries_To_ACF_Repeater( array(
new GPNF_Map_Child_Entries_To_ACF_Repeater( array(
'form_id' => 7, // Set this to the parent form ID
'nested_form_field_id' => 18, // Update to the ID of the Nested Form field.
'field_map' => array(
'num_comedien' => 1,
'role_comedien' => 3,
), // The field map contains "field_name" => "child_entry_field_id" pairs. The field name is the name of the fields in
// the ACF Repeater field. The child entry field ID is the field ID from the child form.
'acf_repeater_field_name' => 'comediens', // Update o the field name of the ACF repeater field.
'acf_repeater_field_name' => 'comediens', // Update to the field name of the ACF repeater field.
) );
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?php
/**
* This snippet has evolved! 🦄
* Find the new version of this snippet here:
Expand Down
1 change: 1 addition & 0 deletions gp-populate-anything/gppa-acf-datepicker-comparison.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?php
/**
* This snippet has evolved! 🦄
* Find the new version of this snippet here:
Expand Down
16 changes: 8 additions & 8 deletions gravity-forms/gw-all-fields-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
*
* - **`{all_fields}`**
*
* By default, enabling this plugin will look for this template:
* By default, enabling this plugin will look for this template:
* `<theme>/gravity-forms/all-fields.php`
*
* Override the `{all_fields}` template for a specific form by specifying the form ID:
* Override the `{all_fields}` template for a specific form by specifying the form ID:
* `<theme>/gravity-forms/all-fields-<formId>.php`
*
* - **`{all_fields:template[custom]}`**
*
* Specify a custom template suffix. This is useful for allowing specific forms to use the same template.
* Specify a custom template suffix. This is useful for allowing specific forms to use the same template.
* `<theme>/gravity-forms/all-fields-custom.php`
*
* - **`{all_fields:notemplate}`**
Expand All @@ -41,24 +41,24 @@
* Filtering will only include the specified fields and exclude all others. It cannot be combined with the include
* exclude filters.
*
* `{all_fields:filter[1]}`
* `{all_fields:filter[1]}`
* `{all_fields:filter[1,2]}`
*
* - **`:include`**
*
* Including will include fields with types that are typically not supported by the `{all_fields}` merge tag
* (e.g., HTML fields).
*
* `{all_fields:include[3]}`
* `{all_fields:include[3,4]}`
* `{all_fields:include[3]}`
* `{all_fields:include[3,4]}`
* `{all_fields:include[3,4],exclude[5]}`
*
* - **`:exclude`**
*
* Excluding will exclude specific fields from being included in the `{all_fields}` output.
*
* `{all_fields:exclude[5]}`
* `{all_fields:exclude[5,6]}`
* `{all_fields:exclude[5]}`
* `{all_fields:exclude[5,6]}`
* `{all_fields:exclude[5],include[3,4]}`
*
*/
Expand Down
2 changes: 1 addition & 1 deletion gravity-forms/gw-custom-validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

if ( strpos( $value, '.' ) !== false ) {
$result['is_valid'] = false;
$result['message'] = 'Please enter a valid value.';
$result['message'] = 'Please enter a valid value.';
}

return $result;
Expand Down
4 changes: 2 additions & 2 deletions gravity-forms/gw-require-unique-values.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function validate( $result, $value, $form, $field ) {
$is_unique = true;

foreach ( $field->inputs as $input ) {
$input_id = $input['id'];
$input_id = $input['id'];
$input_value = rgars( $value, $input_id );

if ( empty( $input_value ) ) {
Expand All @@ -101,7 +101,7 @@ public function validate( $result, $value, $form, $field ) {
}

$input_hash = $this->get_value_hash( array( $input_value ) );
$is_unique = ! in_array( $input_hash, $values );
$is_unique = ! in_array( $input_hash, $values );
if ( ! $is_unique ) {
break;
}
Expand Down