<?php
$civicrm_setting['com.joineryhq.profcond']['com.joineryhq.profcond']['contribution']['all'] = array(
'01_auto_renew_is_checked' => array(
'conditions' => array(
'all_of' => array(
array(
'selector' => 'input[name="price_7"]',
'op' => 'is_checked',
),
),
),
'states' => array (
'pass' => array (
'selectors' => array(
'input#auto_renew[type="checkbox"]' => array (
'properties' => array('checked' => TRUE),
),
),
),
'fail' => array (
'selectors' => array(
'input#auto_renew[type="checkbox"]' => array (
'properties' => array('checked' => FALSE),
),
),
),
),
),
);
I put this in it's own profcond.settings.php
file in case you make a syntax error and want to quickly deactivate thethe conditionals. Add include __DIR__ . '/profcond.settings.php';
to civicrm.settings.php
file for this setup.
Also noting that recently there was a change in core that displays /unchecks unchecks the "Please renew my membership automatically" option so using the "onload" option exclusively no longer works (tested 5.65 where that last worked).