Looking for tips on how to pre-select a checkbox (or anything besides a textfield) in a webform using URL parameters. We have pre-filled a textfield with URL params. We also found this article that explains how to pre-select a field created in webforms. The problem we have is pre-selecting a field brought in from CiviCRM. Does anyone have any tips or know of other nodes that will enable this? We are running Drupal 7 and CiviCRM 5.41.2.
I have done this via two different methods.
One method is using a 'pass-thru' field. I create a webform only text field (it does not need to exist in CiviCRM custom data) and have it pre-fill based on a URL parameter. Then I use conditionals to say if that text field equals "X" set this CiviCRM select field to "X". (I hide this field on the front-side of the form.)