/**
* Conditionally Shows OR Hides DOM Elements in Evolv-CS Forms
*
* @param {array} cfs_fieldSet - List of [column_name]/[HTML element ids]
* @param {boolean} cfs_showHide - Show[1]/Hide[0] elements. Default: [0]
*/
function cfs_CondShowHideDOM(cfs_fieldSet, cfs_showHide) {
cfs_showHide = ((cfs_showHide == null) || (cfs_showHide == false)) ? 'none' : 'inline';
for (var cfs_i = cfs_fieldSet.length - 1; cfs_i >= 0; cfs_i--) {
var cfs_Caption = 'caption_' + cfs_fieldSet[cfs_i];
var cfs_Prompt = cfs_fieldSet[cfs_i] + '_prompt';
var cfs_El = getFormElementDOM(cfs_fieldSet[cfs_i]);
var cfs_ElCaption = getFormElementDOM(cfs_Caption);
var cfs_ElPrompt = getFormElementDOM(cfs_Prompt);
try {
cfs_El.style.display = cfs_showHide;
cfs_ElCaption.style.display = cfs_showHide;
cfs_ElPrompt.style.display = cfs_showHide;
} catch (err) { }
}
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.