Skip to main content
added 30 characters in body
Source Link
Andy Burns
  • 3.7k
  • 11
  • 22

Also noting that recently there was a change in core that displays / unchecks the "Please renew my membership automatically" option when selecting a price option so using the "onload" option exclusively no longer works (tested 5.65 where that last worked).

Also noting that recently there was a change in core that displays / unchecks the "Please renew my membership automatically" option so using the "onload" option exclusively no longer works (tested 5.65 where that last worked).

Also noting that recently there was a change in core that displays / unchecks the "Please renew my membership automatically" option when selecting a price option so using the "onload" option exclusively no longer works (tested 5.65 where that last worked).

added 36 characters in body
Source Link
Andy Burns
  • 3.7k
  • 11
  • 22

I put this in it's own profcond.settings.php file in case you make a syntax error and want to quickly deactivate the conditionals to prevent it from breaking CiviCRM. Add include __DIR__ . '/profcond.settings.php'; to civicrm.settings.php file for this setup.

I put this in it's own profcond.settings.php file in case you make a syntax error and want to quickly deactivate the conditionals. Add include __DIR__ . '/profcond.settings.php'; to civicrm.settings.php file for this setup.

I put this in it's own profcond.settings.php file in case you make a syntax error and want to quickly deactivate the conditionals to prevent it from breaking CiviCRM. Add include __DIR__ . '/profcond.settings.php'; to civicrm.settings.php file for this setup.

deleted 11 characters in body
Source Link
Andy Burns
  • 3.7k
  • 11
  • 22
<?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).

<?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 in case you make a syntax error and want to quickly deactivate the 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 the "Please renew my membership automatically" option so using the "onload" option exclusively no longer works (tested 5.65 where that last worked).

<?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 the 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 the "Please renew my membership automatically" option so using the "onload" option exclusively no longer works (tested 5.65 where that last worked).

Source Link
Andy Burns
  • 3.7k
  • 11
  • 22
Loading