Accessing Name fields from Gravity Forms

0
0

Hello,

I have a gravity form which is the trigger for an automation. It has a “Name” field in it which is two parts “first” and “last”. The ID of the field is 1.

So I am trying to access the first name, last name or fullname. I’ve tried

{trigger[fields][1]} – returns nothing log returns:
Element of the list is not set (index is out of range): TRIGGER[fields][1]
Make sure that you specify the correct list variable or its index

{trigger[fields[1][1]} – returns nothing, log returns:
Element of the list is not set (index is out of range): TRIGGER[fields][1][1]
Make sure that you specify the correct list variable or its index

Can someone please help. It seems that the name would be a pretty basic thing to collect from a Gravity form but for the life of me I cannot figure out how to do it without just changing the form and having the name be a plain text field.

Thanks,

Bill

  • You must to post comments
0
0

It’s easy. For the field with ID = 1 you need to use {TRIGGER[fields][1]} or {TRIGGER.fields.1}

  • Bill Niester
    I thought that would be how to do it as well and as you’ve seen I’ve tried that. Here is exactly what I get with both scenarios: When I try: {TRIGGER.fields.1} I get the output: > {TRIGGER.fields.1} And when I try the other option: {TRIGGER[fields][1]} I get the output: > Element of the list is not set (index is out of range): TRIGGER[fields][1] I’m just not sure if there is something broken or I’m doing something wrong.
  • You must to post comments
0
0
  1. Update the plugin to the latest version, which is 1.6.
  2. Make sure that you use the correct form Field id, which is shown on the form edit screen.
  3. All variables are always enclosed in curly brackets (braces) {}
  • Bill Niester
    I did all of this still not working
  • You must to post comments
0
0

Please, export your workflow and attached it here to your comment so I can look into it.

  • Bill Niester
    OK.. couldn’t figure out how to attach a file so I’ve put the txt below: {“generator”:”https:\/\/jetFlow.io”,”version”:”1.6″,”date_updated”:”27 May 2020 00:04:50″,”date_export”:”27 May 2020 00:07:02″,”flow”:{“id”:0,”name”:”Create zoom meeting”,”description”:””,”flow_status”:”1″,”start_id”:”65″,”config”:”a:2:{s:13:\”logging_level\”;i:1000;s:8:\”validate\”;i:1;}”,”restriction”:”a:5:{s:5:\”roles\”;b:0;s:10:\”authorized\”;i:0;s:4:\”caps\”;a:0:{}s:5:\”users\”;a:0:{}s:2:\”IP\”;a:0:{}}”,”group_id”:”0″,”create_time”:”1590117291″,”update_time”:”1590537890″,”create_author”:”1″,”update_author”:”1″,”flow_hash”:””,”flow_checksum”:””,”version”:””,”css”:””,”last_start”:”1590537900.0343″,”last_start_sk”:”QCDHB7ERm5fPS2Np”,”last_error”:”[1590499395.297733,\”qCKEd4TZeWptw8GU\”,25,\”Unable to save custom field Duration for post #Variable is not a list: {PREVIOUS}\”]”},”actions”:[{“id”:0,”flow_id”:0,”next_id”:0,”class”:”TR_Gravity”,”config”:”a:4:{s:6:\”fields\”;a:1:{s:7:\”form_id\”;s:1:\”7\”;}s:6:\”parsed\”;a:1:{s:7:\”form_id\”;i:0;}s:12:\”extra_config\”;a:0:{}s:11:\”description\”;s:49:\”Start after selected Gravity Forms form submitted\”;}”,”wp_hook”:”gform_entry_created”,”wp_hook_priority”:”20″,”signature”:”-“},{“id”:0,”flow_id”:0,”next_id”:0,”class”:”WF_CreatePost”,”config”:”a:4:{s:6:\”fields\”;a:5:{s:5:\”title\”;s:18:\”{TRIGGER.fields.4}\”;s:7:\”excerpt\”;s:0:\”\”;s:7:\”content\”;s:85:\”FULL NAME: {TRIGGER.fields.1}\nDATE – TIME: {TRIGGER.fields.2} – {TRIGGER.fields.3}\”;s:4:\”main\”;a:3:{s:9:\”post_type\”;s:13:\”zoom-meetings\”;s:6:\”status\”;s:7:\”publish\”;s:6:\”author\”;s:1:\”1\”;}s:3:\”tax\”;a:1:{i:0;a:2:{s:8:\”taxonomy\”;s:8:\”category\”;s:8:\”taxvalue\”;s:0:\”\”;}}}s:6:\”parsed\”;a:5:{s:5:\”title\”;i:1;s:7:\”excerpt\”;i:0;s:7:\”content\”;i:3;s:4:\”main\”;a:3:{s:9:\”post_type\”;i:0;s:6:\”status\”;i:0;s:6:\”author\”;i:0;}s:3:\”tax\”;a:1:{i:0;a:2:{s:8:\”taxonomy\”;i:0;s:8:\”taxvalue\”;i:0;}}}s:12:\”extra_config\”;a:0:{}s:11:\”description\”;s:25:\”Create a new post or page\”;}”,”wp_hook”:””,”wp_hook_priority”:”0″,”signature”:”-“}]}==/1984/626742259/EOF
  • You must to post comments
0
0

Do you see any errors in the Log after the form is submitted and workflow has started?

  • Bill Niester
    Here is the log: 7 seconds ago Finished Create zoom meeting 54 7 seconds ago Executed Create zoom meeting Create post 50 7 seconds ago Make sure that you specify the correct list variable or its index: Element of the list is not set or the index is out of range: {TRIGGER.fields.1} Create zoom meeting Create post 13 7 seconds ago Start workflow (hook: gform_entry_created, 20) Create zoom meeting Gravity form submitted t 0
  • You must to post comments
0
0

You use an incorrect Field ID. In your case, there is no form field with ID = 1. That’s why you see an error with {TRIGGER.fields.1}. Please open the appropriate form in the editor to see all field IDs.

  • Bill Niester
    There is indeed a form field with ID = 1. This is the field that is of type “Name” which displays a field for “first name” and “last name”. If we read the gravity forms documentation we see that these fields are actually referred to as 1.3 and 1.6 (see merge tags https://docs.gravityforms.com/name/#merge-tags). I have tried {TRIGGER[1][3]} and {TRIGGER[1.3]} all with no success.
  • You must to post comments
0
0

Now I see the root cause. The issue is caused by the dot in the Field ID. For the time being, dots in variable keys are not supported, so you cannot specify {TRIGGER[1.3]}. In the next version of the plugin, it will be implemented. For now, you cannot use the “Name” and “Address” field types from the “Advanced Fields” section. Use other types of fields instead.

  • You must to post comments
Showing 6 results
Your Answer

Please first to submit.