Welcome! Log In Create A New Profile

Advanced

WB - Controls In Looper

WB - Controls In Looper
March 02, 2021 12:56PM
Hi All

Been away from WB programming for a while now so this question may sound really stupid.

I need the user to be able to click on something [anything] on a line in a looper that will either increase [+1] or decrease [-1] a value in the looper. I cannot find a decent control to place in the looper that will give me this functionality wherein I can place my code.

No idea if that makes any sense.

Thanks in advance.

Cheers
Andre
Argus
Re: WB - Controls In Looper
March 02, 2021 01:04PM
a button or a link will do the trick...
You may have problem if your looper is not in the proper mode, though... If nothing changed, it needs to be in EDIT for the controls to be active (you can have each other control than the button inactive in it, of course)
Re: WB - Controls In Looper
March 02, 2021 11:09PM
Hi Argus

Thanks for that - I did try a button but it looked awful - and it messed up the height of the looper.

Will give that a bash again and if I can display flat and small with legible + and - sign.

What will the property for the attribute be? And what would I be passing to that when adding a line?

Cheers
André
Re: WB - Controls In Looper
March 04, 2021 10:00AM
Hi André,

That's really simple, use the server code in the plus or minus button.
The button does not need any attribute.
If ATT_MyValue is the attribute of the control to be incremented:
//click on plus button
ATT_MyValue[LOOP_MyLooper]++

Regards,
Piet
Re: WB - Controls In Looper
April 16, 2021 12:46PM
Hi All

Thanks to everyone - got it resolved. Got an online shop running.

Montpelier has really made this all awfully simple. And great help here too.

Cheers

André
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: