I have a form on my website which is collapsed when the page first loads. I have a few buttons which I have programmed to expand the form when clicked. And a button on the form which collapses the form when clicked. They seem to work. But when the form has been collapsed pressing the expand buttons no longer brings up the form. Do the buttons only work once?
top of page
Important forum update
This forum is migrating to one unified Wix community forum starting July 26th, and will be read-only during the process.
Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
bottom of page
here is the full code:
$w.onReady(function () {
//TODO: write your page related code here...
});
export function button2_click(event) {
//Add your code for this event here:
$w('#form1').expand()
}
export function button3_click(event) {
//Add your code for this event here:
$w('#form1').expand()
}
export function button4_click(event) {
//Add your code for this event here:
$w('#form1').expand()
}
export function button5_click(event) {
//Add your code for this event here:
$w('#form1').expand()
}
export function button6_click(event) {
//Add your code for this event here:
$w('#form1').expand()
}
export function button7_click(event) {
//Add your code for this event here:
$w('#form1').collapse();
}
although it seems to be working now...
Why bother with a collapsing or expanding form, when you can just use a lightbox on that page.
However, if you have coded everything correctly, then there should be no reason why your separate buttons for collapsing or expanding the form will work.
No it should always work unless there's a bug.
Maybe you should post your code here for review.