I've created a webform for reviewers to make a decision on a scientific abstract which is a CiviCRM activity.

Their review is a second activity in CiviCRM, all linked within a case.

All is working as needed using the activity1=[id] parameters in the url.

However, I want reviewers to be able to see the details of the abstract activity to make their review decision, but not change them. Text fields / areas are simple as webforms allow you to disable (see image below), but select fields, this option doesn't appear.

Is there a way I can disable select fields / make them uneditable but visible?

enter image description here

  • I've made a webform to reproduce what you are doing so as to help, but I can't get it to pull in the details of an existing activity at all! Can you let me know what steps you took to do this? Thanks – naomi Jul 10 '18 at 12:54
  • You need to ensure you also include the contacts in the webform who are involved in the activity. So in my case, the current logged in user is the activity target contact and I've pulled in the activity source contact also through the url. So my url is www.example.org/node/1?cid2=123&activity1=456 – Heather O. Jul 10 '18 at 13:37
  • I should have commented that this is the case for any non-text field, so it could be something like the individual prefix field where this would be the case as well. – Heather O. Jul 10 '18 at 13:38

When you are on the page for editing the form component, you can change the widget from select options to a textfield. Then the option to disable becomes available.

However, it will display the value of the select, not the label - for example I tried with Name Prefix and for "Dr" it put "4".

But if you are dealing with custom fields where you can set the values to be the same as the labels that shouldn't be a problem.

Where it might cause a problem is activity status - could you get away without showing that?

  • Thanks for the suggestion. I did try this with the field, but I used ids for custom fields. There is already a lot of data in these fields and I wouldn't want to start messing about with field IDs as that has caused me grief in the past. I've also tried it with a date field, and the date displays, but you get an error and cannot submit the form. – Heather O. Jul 11 '18 at 13:19

You will need to make sure your webform has more than one page.

Make sure your select option is on page 1 of the webform.

Select “Private” for the select option. This is presuming your reviewers don’t have webform results permission granted. This option will then be hidden for your reviewers.

Then follow the steps as described here

The select option will then appear on any subsequent pages as a read only field.

  • Thanks for the suggestion. However, because select field values are numbers in CiviCRM, the number outputs, not the label. Using the individual prefix field as an example again, I would see 8 instead of Mrs. – Heather O. Jul 19 '18 at 7:52

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.