Hello! I am attempting to make a dropdown where each category leads to a different contact form. I might want to make my own Wix Custom Contact Form on my Website. I would fundamentally like a drop-down where individuals can choose various sorts of help they need, and when I select it, there is an alternate contact structure for each drop-down determination. Appended is what I need the page to resemble, where I can tap on the help I need, and an alternate contact structure will spring up. Likewise, when it says “Pick a Category” I don’t need anything on the page, and when they pick a classification, a form pops up. Much obliged to you! The solutions I found were for two dropdowns. I need an answer where I have one dropdown and one structure. The issue with the Multistate box is that it disposes of the classification once you click on the form page. The .hide command does not work as well, and when I try to put it in my code and run it, nothing happens. I need the classification choice and the form choice all to be in one spot! Likewise, I need numerous forms for various kinds of help (Ex. Contact, Questions, FAQ, and so on.). On the off chance that you can modify my code, and mention to me what I am fouling up, and endeavor to fix it, that would be extraordinary! My code is below:
import {categories} from ‘categories’;
$w.onReady(function() {
$w(’ #Category ‘).options = categories;
$w(’ #Category ‘).onChange(() => {
if ($w(’ #Category ‘).value === ‘Choose a category’) {
$w(’#testform1’).hide();
}
if ($w(’ #Category ‘).value === ‘Support’) {
$w(’#testform2’).show();
}
if ($w(’ #Category ‘).value === ‘Legal’) {
$w(’#testform3’).show();
}
if ($w(‘#Category’).value === ‘FAQ’) {
$w(‘#testform4’).show();
}
if ($w(‘#Category’).value === ‘Job Applications’) {
$w(‘#testform5’).show();
}
});
});