// function attr() is used to name and value string if exists. // Value is passed in double quotes; function FWattr(name, value) { if (!value || value == "") return ""; if (value.indexOf("\"") != -1) return ' ' + name + '=\'' + value + '\''; //value contains " else return ' ' + name + '="' + value.toString() + '"'; //toString() converts true or false } /** * Return html for selected form builder fields. */ function FWquickbuilder_html() //was FWmake_html(inId) before tinymce { var html = ""; var isTable = FW.quickbuilder.checked[13]; if (isTable) html += ''; for (counti = 0; counti < 12; counti = counti + 1) { if (FW.quickbuilder.checked[counti] == true) { if (isTable) html += ''; else html += '
'; } } // for each selected element loop ends if (isTable && (!findInputType('submit') || !findInputType('reset'))) html += '
' html += FW.quickbuilder.caption[counti] if (isTable) html += '' if (counti == 5) //check if selection list for countries is checked { html += '
' + getCountryList(); } else if(counti == 10){// for attachment type html += '
' } if (isTable) html += '
'; if (!findInputType('submit')) html += ''; if (!findInputType('submit') && !findInputType('reset')) html += '     '; if (!findInputType('reset')) html += ''; if (isTable && (!findInputType('submit') || !findInputType('reset'))) html += '
'; return html; } function FWInspection_html() //was FWmake_html(inId) before tinymce { var html = ""; var isTable = FW.quickbuilder.checked[7]; if (isTable) html += ''; for (counti = 0; counti < 7; counti = counti + 1) { if (FW.quickbuilder.checked[counti] == true) { if (isTable) html += ''; else html += '
'; } } // for each selected element loop ends if (isTable && (!findInputType('submit') || !findInputType('reset'))) html += '
' if(counti == 0) html += '

'+FW.quickbuilder.caption[counti]; else html += FW.quickbuilder.caption[counti]; if (isTable) html += '

' html += '

' if (isTable) html += '
'; if (!findInputType('submit')) html += ''; if (!findInputType('submit') && !findInputType('reset')) html += '     '; if (!findInputType('reset')) html += ''; if (isTable && (!findInputType('submit') || !findInputType('reset'))) html += '
'; return html; } function FWGeneralRequest_html() //was FWmake_html(inId) before tinymce { var html = ""; var isTable = FW.quickbuilder.checked[9]; if (isTable) html += ''; for (counti = 0; counti < 9; counti = counti + 1) { if (FW.quickbuilder.checked[counti] == true) { if (isTable) html += ''; else html += '
'; } } // for each selected element loop ends if (isTable && (!findInputType('submit') || !findInputType('reset'))) html += '
' html += FW.quickbuilder.caption[counti] if (isTable) html += '' if (counti == 0) //check if selection list for countries is checked { html += '
' + getRequestTypeList(); } else { html += '
' } if (isTable) html += '
'; if (!findInputType('submit')) html += ''; if (!findInputType('submit') && !findInputType('reset')) html += '     '; if (!findInputType('reset')) html += ''; if (isTable && (!findInputType('submit') || !findInputType('reset'))) html += '
'; return html; } //method for adding counrty list function getCountryList() { var countryList = '