Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
$(function () {
$('.selectEmailOptionsTypeInput').on('change', function () {
const select = $(this).closest('.selectEmailOptionsType').siblings('.selectEmailOptions');
if ($(this).val() === 'days') {
select.removeClass('hidden');
select.find('option.selectEmailOptionDays').removeClass('hidden').prop('disabled', false);
select.find('option.selectEmailOptionHours').addClass('hidden').prop('disabled', true);
} else if ($(this).val() === 'hours') {
select.removeClass('hidden');
select.find('option.selectEmailOptionHours').removeClass('hidden').prop('disabled', false);
select.find('option.selectEmailOptionDays').addClass('hidden').prop('disabled', true);
} else if ($(this).val() === 'noemail') {
select.addClass('hidden');
}
}).trigger('change');
});
$('#cbfr_336').addClass('selectEmailOptionsType');
$('#cb_emailoptions_type_cbf0').addClass('selectEmailOptionsTypeInput');
$('#cb_emailoptions_type_cbf1').addClass('selectEmailOptionsTypeInput');
$('#cb_emailoptions_type_cbf2').addClass('selectEmailOptionsTypeInput');
$( '#cb_emailoptions_type_cbf0, #cb_emailoptions_type_cbf1, #cb_emailoptions_type_cbf2').on('change', function () {
const select = $( this ).closest( '#cbfv_336' ).siblings( '.selectEmailOptions' );
var div = $('#cbfr_336');
var cbf0 = $('#cb_emailoptions_type_cbf0');
var cbf1 = $('#cb_emailoptions_type_cbf1');
var cbf2 = $('#cb_emailoptions_type_cbf2');
div.className += " selectEmailOptionsType";
cbf0.className += " selectEmailOptionsTypeInput";
cbf1.className += " selectEmailOptionsTypeInput";
cbf2.className += " selectEmailOptionsTypeInput";
$('[name="cb_emailoptions_type"]').click(function () {
$('#cbfv_336').addClass('selectEmailOptionsType');
$('#cb_emailoptions_type_cbf0').addClass('selectEmailOptionsTypeInput');
$('#cb_emailoptions_type_cbf1').addClass('selectEmailOptionsTypeInput');
$('#cb_emailoptions_type_cbf2').addClass('selectEmailOptionsTypeInput');
});
Please Log in to join the conversation.
Remove the jQuery ready statement surrounding the jQuery when adding that to CB Auto Actions or that won't work.I will use CBradiofield for user option and HTMLcustomfield for visitor select options. Their connection will be established using
You shouldn't be using this at all for profile edit. Let CB Conditional deal with showing/hiding things. You're adding custom coding and extra things to maintain that you don't need.Do you think it will be wise to use something like the below in order to add the classes missing from the normal CBradiofield in order to make it work?
The jQuery and HTML I provided below is EXCLUSIVELY for the userlist output you were original asking for. It's not going to work in profile edit. Use CB Conditional for profile edit behaviors.I haven't managed so far to make JQueryAutoAction to work. I have tried calling the ids instead of classes with no luck
Please Log in to join the conversation.
Please Log in to join the conversation.