Answers.Body: <p>This was my own confusion and I had help from the CF-CiviCRM author. Great support there. </p>
  
  <p>The problem was related to conditional statements in the form. I had created conditions for the appearance of all the contacts in a multi-contact form, but I hadn't applied conditions to processors. </p>
  
  <p>I had assumed that the conditions related to the show/hide fields were inherited by processors. That's not the case. Instead, each contact processor had to have its own conditions applied to the group of fields. </p>
  
  <p>For example. Only process the second contact group if First Name 2 is %first_name_2%. In other words, if the first name of the 2nd contact is blank, don't process that contact group. This is regardless of whether the conditions allow visibility for that contact. The visibility rules were not applied to the processing of the group. </p>
  
  <p>Lesson learned, and maybe someone else will benefit from my experience.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-26T17:04:28.570Z
Answers.LastActivityDate: 2019-08-26T17:04:28.570Z
Answers.UserDisplayName: LyonsDigital
Answers.Body: <p>Not sure what the exact error is, but to explain the backtrace mentioned above, it seems the contact create api is failing for some reason. </p>
  
  <blockquote>
    <p>I have collected the first and last names as well as email. I'm not sure where to define the display_name and where I should be passing it. Any help and guidance is appreciated.</p>
  </blockquote>
  
  <p>It is not that civi api is expecting a valid value for display_name. The API is returning an error because it is not able to find any of the value sent from the CF to process and create a contact in civi. If any of the value from <code>first_name, last_name, email, display_name</code> is retrieved correctly by the api, the contact will be created without any error.</p>
  
  <p>So make sure user enters a valid value for first name, last name or email field on the form OR make email as a required field, enable "Process email for this contact." in contact config, etc.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-23T16:41:23.023Z
Answers.Text: I believe the name and email fields are already required, along with a handful of others for this event processing. I will double check though. I also have some feedback from github that CF-Civicrm may be looking for values for every field in the form processor, whether I've collected it or not. I will be testing that shortly. Thanks for the input though. I'll make another pass through all my previous checks, just in case I've missed something.
Answers.UserDisplayName: LyonsDigital
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-23T11:47:11.030Z
Answers.LastActivityDate: 2019-08-23T11:47:11.030Z
Answers.UserDisplayName: jitendra - fuzion
Body: <p>My registrations are failing miserably and it's making me crazy. I can see that some values are being passed to contact profiles, but the users aren't being registered. </p>
  
  <p>I'm on CentOS 7.x, PHP 7.2 with WP 5.2.2 and Civi 5.13.4.</p>
  
  <p>I'm getting the following error:</p>
  
  <pre><code>Mandatory key(s) missing from params array: one of (first_name, last_name, email, display_name)
  
  #0 /home/fpptaweb/public_html/wp-content/plugins/cf-civicrm/processors/contact/class-contact-processor.php(228): civicrm_api3('Contact', 'create', Array)
  #1 /home/fpptaweb/public_html/wp-content/plugins/caldera-forms/classes/core.php(3273):    CiviCRM_Caldera_Forms_Contact_Processor-&gt;pre_processor(Array, Array, '_cf_process_5d5...')
  #2 /home/fpptaweb/public_html/wp-content/plugins/caldera-forms/classes/core.php(5203): Caldera_Forms::process_submission()
  #3 /home/fpptaweb/public_html/wp-content/plugins/caldera-forms/classes/core.php(3821): Caldera_Forms::process_form_via_post()
  #4 /home/fpptaweb/public_html/wp-includes/class-wp-hook.php(286): Caldera_Forms-&gt;cf_init_system('')
  #5 /home/fpptaweb/public_html/wp-includes/class-wp-hook.php(310): WP_Hook-&gt;apply_filters(NULL, Array)
  #6 /home/fpptaweb/public_html/wp-includes/plugin.php(465): WP_Hook-&gt;do_action(Array)
  #7 /home/fpptaweb/public_html/wp-settings.php(546): do_action('wp_loaded')
  #8 /home/fpptaweb/public_html/wp-config.php(88): require_once('/home/fpptaweb/...')
  #9 /home/fpptaweb/public_html/wp-load.php(37): require_once('/home/fpptaweb/...')
  #10 /home/fpptaweb/public_html/wp-blog-header.php(13): require_once('/home/fpptaweb/...')
  #11 /home/fpptaweb/public_html/index.php(17): require('/home/fpptaweb/...')
  #12 {main}
  </code></pre>
  
  <p>I have collected the first and last names as well as email. I'm not sure where to define the display_name and where I should be passing it. Any help and guidance is appreciated.</p>
  
Tags: <wordpress><civievent><caldera-forms>
Title: Problems with CF_CiviCRM Registration with Caldera Forms
ThreadText: # Problems with CF_CiviCRM Registration with Caldera Forms
  
  (Asked by: username_0 on 2019-08-20)
  
  My registrations are failing miserably and it's making me crazy. I can see that some values are being passed to contact profiles, but the users aren't being registered.
  
  I'm on CentOS 7.x, PHP 7.2 with WP 5.2.2 and Civi 5.13.4.
  
  I'm getting the following error:
  
  ```
  Mandatory key(s) missing from params array: one of (first_name, last_name, email, display_name)
  
  #0 /home/fpptaweb/public_html/wp-content/plugins/cf-civicrm/processors/contact/class-contact-processor.php(228): civicrm_api3('Contact', 'create', Array)
  #1 /home/fpptaweb/public_html/wp-content/plugins/caldera-forms/classes/core.php(3273):    CiviCRM_Caldera_Forms_Contact_Processor->pre_processor(Array, Array, '_cf_process_5d5...')
  #2 /home/fpptaweb/public_html/wp-content/plugins/caldera-forms/classes/core.php(5203): Caldera_Forms::process_submission()
  #3 /home/fpptaweb/public_html/wp-content/plugins/caldera-forms/classes/core.php(3821): Caldera_Forms::process_form_via_post()
  #4 /home/fpptaweb/public_html/wp-includes/class-wp-hook.php(286): Caldera_Forms->cf_init_system('')
  #5 /home/fpptaweb/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
  #6 /home/fpptaweb/public_html/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
  #7 /home/fpptaweb/public_html/wp-settings.php(546): do_action('wp_loaded')
  #8 /home/fpptaweb/public_html/wp-config.php(88): require_once('/home/fpptaweb/...')
  #9 /home/fpptaweb/public_html/wp-load.php(37): require_once('/home/fpptaweb/...')
  #10 /home/fpptaweb/public_html/wp-blog-header.php(13): require_once('/home/fpptaweb/...')
  #11 /home/fpptaweb/public_html/index.php(17): require('/home/fpptaweb/...')
  #12 {main}
  
  ```
  
  I have collected the first and last names as well as email. I'm not sure where to define the display\_name and where I should be passing it. Any help and guidance is appreciated.
  
  **Tags:** wordpress, civievent, caldera-forms
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2019-08-26. Score: 2
  
  This was my own confusion and I had help from the CF-CiviCRM author. Great support there.
  
  The problem was related to conditional statements in the form. I had created conditions for the appearance of all the contacts in a multi-contact form, but I hadn't applied conditions to processors.
  
  I had assumed that the conditions related to the show/hide fields were inherited by processors. That's not the case. Instead, each contact processor had to have its own conditions applied to the group of fields.
  
  For example. Only process the second contact group if First Name 2 is %first\_name\_2%. In other words, if the first name of the 2nd contact is blank, don't process that contact group. This is regardless of whether the conditions allow visibility for that contact. The visibility rules were not applied to the processing of the group.
  
  Lesson learned, and maybe someone else will benefit from my experience.
  
  
  ---
  
  ### Answer by username_1 on 2019-08-23. Score: 0
  
  Not sure what the exact error is, but to explain the backtrace mentioned above, it seems the contact create api is failing for some reason.
  
  > I have collected the first and last names as well as email. I'm not sure where to define the display\_name and where I should be passing it. Any help and guidance is appreciated.
  
  It is not that civi api is expecting a valid value for display\_name. The API is returning an error because it is not able to find any of the value sent from the CF to process and create a contact in civi. If any of the value from `first_name, last_name, email, display_name` is retrieved correctly by the api, the contact will be created without any error.
  
  So make sure user enters a valid value for first name, last name or email field on the form OR make email as a required field, enable "Process email for this contact." in contact config, etc.
  
  > **Comments:**
  > **username_0**: I believe the name and email fields are already required, along with a handful of others for this event processing. I will double check though. I also have some feedback from github that CF-Civicrm may be looking for values for every field in the form processor, whether I've collected it or not. I will be testing that shortly. Thanks for the input though. I'll make another pass through all my previous checks, just in case I've missed something.  
  
  ---
  
  