1

I have been charged with developing CivicCrm for my place of business.

The company I work for is a nonprofit and we help people with disabilities both mental and physical. The Department that deals with seniors needs to produce reports to certain agencies. As part of the reporting, a matrix must be filled out – This is a questionnaire.

I currently have all of the question fields created in sections/tabs under CivicCase. The matrix is grouped by questions. For example a section entitled Income will have 4-5 questions based on Income. Depending on the yes or no answers a final field (#6) will need to be automatically populated. For example the questions are:

  1. Does the household have income (both earned income and cash benefits)?
  2. Is the household's income greater than or equal to 200% of Federal Poverty Guidelines?
  3. Does the household show appropriate spending habits (Focus on meeting basic needs before purchasing luxuries, no unusually high costs, no spontaneous or inappropriate spending)
  4. Does the household need assistance (Outside of own income) to meet basic needs?
  5. Does the household have discretionary income and the ability to save?
  6. Score:

So if 1 is answered yes you would continue to 2. If 2 were answered yes you would continue to 3. If 3 was “no” then a score would need to be recorded in field #6 above and no further questions would be needed and the rest would need to be changed to no. There will be several sections that will be about employment, Housing, etc. that would need to be scored similarly.

I have currently been able to use JavaScript to change the fields but when saved the incorrect value is saved in the database. I am using 2 answer dropdown selections.

I know this is probably something simple I am missing. What value should I be changing for it to save to the database?

CivicCRM version: 4.7.4 Drupal: 7.43

I am not using anything other than a custom jQuery script that I am including in the head of the document using the Drupal template.php file.

Thank you C Tyler

1

Are you changing it to the "value" or the "label" for the dropdown options? It should be the "value" (as defined when you set up the multiple choice options for the field). Or you can look in the generated html which might look like this <option value="1">Yes</option>, and then you'd use "1", not "Yes". It's the select tag you want to update not the associated input tag (well, yes the input tag too, but it only matters for the display on-screen).

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.