1

We are using CiviCRM (4.7.9) with WordPress (4.5.3). We are pulling the data from the CiviCRM state and country tables into Gravity Forms using code in our function.php. But we are running into problems when a Country does not have a State. The WP Gravity form will save all the data, no problem. And the web hooks that we are using between WP and CiviCRM will send the info into Civicrm, but it will not send the Country information when there is no State, even though there is no corresponding State for these Countries in the CiviCRM tables. Is there another value we are suppose to send? A Null value?

6
  • 2
    I think a code sample would be useful to understand what is going on, ie are you using Civi's API, SQL? – Andrei Jul 28 '16 at 8:42
  • we added code to wp function.php – Nina Gonzalez Jul 28 '16 at 18:27
  • I don't see how you save the data to Civi, there should be a gform_after_submission action hook – Andrei Jul 29 '16 at 8:15
  • we are using a civicrm extension from civivip that works with gravity forms and civicrm. – Nina Gonzalez Jul 30 '16 at 16:55
  • Nina I'm afraid I cannot point you in any direction without knowing how the data is sent/saved from GForms to CiviCRM, I suggest you get in touch CiviVIP and explain them the issue. I also suggest you use Civi's API to retrieve data from Civi, I added a gist following GForm's guide here gist.github.com/mecachisenros/d0eec1f657ae0ee39f383a13a32e5ccd that instead of targeting the fields on a form_id/field_id basis you would just add a class like civicrm-country or civicrm-state-province to the dropdown that you want to be populated with Civi data – Andrei Aug 2 '16 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.