shx-3d-render

main
Jan Umbach 2024-06-15 11:51:38 +02:00
parent cf652efc1c
commit 8544250741
1 changed files with 30 additions and 0 deletions

View File

@ -65,6 +65,35 @@
}
/*<select id="ContactForm-reason" name="contact[reason]" class="field__input" style="height: 60px">
<option value="allgemein">Allgemein</option>
<option value="feedback">Feedback</option>
<option value="einProblemMelden">Ein Problem melden</option>
<option value="erstattungOderRabattBeantragen">Erstattung oder Rabatt beantragen</option>
<option value="produktfrage">Produktfrage</option>
<option value="sonderanfertigung">Sonderanfertigung</option>
<option value="kooperationAnfragen">Kooperation anfragen</option>
<option value="sonstiges">Sonstiges</option>
</select>*/
function SHX_IFC_genDropdownSelect(inputID, labelText, inputName, inputVal, options) {
let html = `
<label class="form__label custom" for="${inputID}-label">${labelText}</label>
<div class="field custom">
<select id="${inputID}" name="properties[${inputName}]" class="field__input" style="height: 60px">
`;
for(let i = 0; i < options.length; i++) {
html += `<option value="${options[i]}" ${inputVal === options[i] ? 'selected' : ''}>${options[i]}</option>`;
}
html += `</select></div>`;
return html;
}
const defaultStyle = `<style>.custom.form__label{margin-bottom: 0.6rem}.field.custom{margin-top: 0.6rem}.custom .field__input{padding-top:0.8rem}</style>`;
let globalInputFormsObj = {
@ -73,6 +102,7 @@
let html = defaultStyle;
html += SHX_IFC_genTextInput('shx-text1', 'Custom Text 1', 'Custom Text 1', globalInputFormsObjValues['test1']['shx-text1']);
html += SHX_IFC_genDropdownSelect('shx-font', 'Dropdown', 'dropdown', 'test', ['test', 'test2', 'test3']);
html += SHX_IFC_genRenderButton();
return html;