0

Using the Conditionals extension, is there a way to have a different "onload" rule for the main participant page/form vs. the additional participants? Tried the following example (hoping the 'onload' rule would only fire on the 'Register' form), but the limit/formId is being ignored by the onload rule.

global $civicrm_setting;
$civicrm_setting['com.joineryhq.profcond']['com.joineryhq.profcond'] = array(
  'event' => array(
    1603 => array (
      'onload' => array(
        'limit' => array(
          'formId' => array(
            'pattern' => 'Register',
          )
        ),
        'selectors' => array(
          'div.price-set-row.options-row1' => array(
            'display' => 'show',
          ),
          'div.price-set-row.options-row2' => array(
            'display' => 'hide',
          ),
        ),
      ),
    ),
  ),
);

Would love row1 to display on the main participant page, and row 2 on the additional participant page.

If two "versions" of onload are not possible, is there another way to accomplish this? Please note, the row1/row2 elements need to display or hide without any action by the user (i.e., it's not based on a value in another field), and also need to be checked/unchecked accordingly (the example above is simplified, and doesn't have all the desired logic).

Thank you for any pointers.

0

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.