Page 1 of 1

Value vs Text for Button

Posted: Wed Jun 17, 2015 2:00 pm
by Marco Spera

Hi,

Is it possible to show a certain text on a button, yet have the underlying value for this button to be something else? I see this option in the mappings for other components, but I do not see it for the group button?

I would like to map my button to say something like "My age is 25" yet have the actual underlying value of the button be "25" so that I can use it for other mappings.

I have attached a screenshot of my mappings but I only see the option for "Text" and not another option for "value"

Can this maybe be accomplished somehow through js?

Thanks


Value vs Text for Button

Posted: Wed Jun 17, 2015 2:01 pm
by Marco Spera

Here is the attachment. Image


Value vs Text for Button

Posted: Wed Jun 17, 2015 4:16 pm
by Serhii Kulibaba

Hello Marco,

Button component doesn't have "value" attribute, but you can write nessecary data into a custom attribute.
E.g.:
1) add JS to the $-Tools mapping:
element.attr("data-value", value.Total);
2) Check this attribute on click event

More information here: https://devcenter.appery.io/documenta...


Value vs Text for Button

Posted: Wed Jun 17, 2015 5:00 pm
by Marco Spera

I will try it out.

Thanks!