/**
* Shows and/or Hides DOM Elements in Evolv-CS Forms
*
* @param {array} cfs_fieldSetShow - List of [column_name]/[HTML element ids] to SHOW
* @param {array} cfs_fieldSetHide - List of [column_name]/[HTML element ids] to HIDE
*/
function cfs_ShowHideDOM(cfs_fieldSetShow, cfs_fieldSetHide) {
cfs_show = 'inline';
cfs_hide = 'none';
for (var cfs_i = cfs_fieldSetShow.length - 1; cfs_i >= 0; cfs_i--) {
var cfs_Caption = 'caption_' + cfs_fieldSetShow[cfs_i];
var cfs_Prompt = cfs_fieldSetShow[cfs_i] + '_prompt';
var cfs_El = getFormElementDOM(cfs_fieldSetShow[cfs_i]);
var cfs_ElCaption = getFormElementDOM(cfs_Caption);
var cfs_ElPrompt = getFormElementDOM(cfs_Prompt);
try {
cfs_El.style.display = cfs_show;
cfs_ElCaption.style.display = cfs_show;
cfs_ElPrompt.style.display = cfs_show;
} catch (err) { }
}
for (var cfs_i = cfs_fieldSetHide.length - 1; cfs_i >= 0; cfs_i--) {
var cfs_Caption = 'caption_' + cfs_fieldSetHide[cfs_i];
var cfs_Prompt = cfs_fieldSetHide[cfs_i] + '_prompt';
var cfs_El = getFormElementDOM(cfs_fieldSetHide[cfs_i]);
var cfs_ElCaption = getFormElementDOM(cfs_Caption);
var cfs_ElPrompt = getFormElementDOM(cfs_Prompt);
try {
cfs_El.style.display = cfs_hide;
cfs_ElCaption.style.display = cfs_hide;
cfs_ElPrompt.style.display = cfs_hide;
} 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.