Toggle Form & Highlight Visible

Upon loading the BiWeeklyForm is hidden as are both ButtonBorders. In preview mode, only the WeeklyButton Objects show a clickevent (hand with finger) upon hover. The BiWeeklyButton Objects do not. No action occurs when either set of objects is clicked.

// For full API documentation, including code examples, visit http://wix.to/94BuAAs

$w.onReady(function () {
//TODO: write your page related code here…
});

function ShowWeekly(){
$w(“#WeeklyButtonBorder”).show();
$w(“#BiWeeklyButtonBorder”).hide();
$w(“#WeeklySignUpForm”).show();
$w(“#BiWeeklySignUpForm”).hide();
}

function ShowBiWeekly(){
$w(“#WeeklyButtonBorder”).hide();
$w(“#BiWeeklyButtonBorder”).show();
$w(“#WeeklySignUpForm”).hide();
$w(“#BiWeeklySignUpForm”).show();
}

export function WeeklyButtonBorder_click(event) {
ShowWeekly;
}

export function WeeklyButton_click(event) {
ShowWeekly;
}

export function WeeklyButtonImage_click(event) {
ShowWeekly;
}

export function WeeklyButtonText_click(event) {
ShowWeekly;
}

export function BiWeeklyButtonBorder_click(event) {
ShowBiWeekly;
}

export function BiWeeklyButton_click(event) {
ShowBiWeekly;
}

export function BiWeeklyButtonImage_click(event) {
ShowBiWeekly;
}

export function BiWeeklyButtonText_click(event) {
ShowBiWeekly;
}

Thank you for any help. I am thinking this should be simple.

Not quite sure I understand what you’re trying to do, but anyway, in order to run a function you should call it using parentheses - () .
so change all of your ‘ShowBiWeekly’ to ‘ShowBiWeekly()’ and ‘ShowWeekly’ to ‘ShowWeekly()’ inside the event handlers.

Liran.

Updated and still nothing…

Button Border and Image are Shapes
Button Background is a Container Box
Button Text is Text

Forms are Widgets (POWr Forms)

// For full API documentation, including code examples, visit http://wix.to/94BuAAs

$w.onReady(function () {
//TODO: write your page related code here…
});

function ShowWeekly(){
$w(“#WeeklyButtonBorder”).show();
$w(“#BiWeeklyButtonBorder”).hide();
$w(“#WeeklySignUpForm”).show();
$w(“#BiWeeklySignUpForm”).hide();
}

function ShowBiWeekly(){
$w(“#WeeklyButtonBorder”).hide();
$w(“#BiWeeklyButtonBorder”).show();
$w(“#WeeklySignUpForm”).hide();
$w(“#BiWeeklySignUpForm”).show();
}

export function WeeklyButtonBorder_onClick(event) {
ShowWeekly();
}

export function WeeklyButton_onClick(event) {
ShowWeekly();
}

export function WeeklyButtonImage_onClick(event) {
ShowWeekly();
}

export function WeeklyButtonText_onClick(event) {
ShowWeekly();
}

export function BiWeeklyButtonBorder_onClick(event) {
ShowBiWeekly();
}

export function BiWeeklyButton_onClick(event) {
ShowBiWeekly();
}

export function BiWeeklyButtonImage_onClick(event) {
ShowBiWeekly();
}

export function BiWeeklyButtonText_onClick(event) {
ShowBiWeekly();
}

The goal is to have one form hide and the other form show depending upon the “Button” clicked on.

Hi Adam,
Sorry for the delay,
Care to share a URL to your site?
I’ll have a look.

Liran.

https://www.citycompost.com/copy-of-sign-up-1

AS far as I can tell, you have some wiring issues…
See here:

#WeeklyButton’ has configured ‘onClick’ to be ‘container3_click’.
But you don’t have that function at your code.

My suggestion,
Use the properties panel to create new ‘onClick’ functions.
Also, having an ‘onClick’ on all of the elements will make the ‘show()’ and ‘hide()’ run multiple time and can ruin your intention.
For example, let’s say you have the border box over the button box… then, if you set ‘onClick’ for both of them… both will run…
So you should only have one ‘onClick’ - set for the upper element box (the border in your case).

Let me know how it goes,
Liran.

Lirah,

Thank you, with your help I was able to get this to work. The one additional thing I need to add was to call the function when the group for below the button border is clicked because the button border is sometimes hidden.

Thank you again,

Adam