Marco Spera
Posts: 0
Joined: Tue Jun 17, 2014 7:14 pm

Value vs Text for Button

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

Marco Spera
Posts: 0
Joined: Tue Jun 17, 2014 7:14 pm

Value vs Text for Button

Here is the attachment. Image

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Value vs Text for Button

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...

Marco Spera
Posts: 0
Joined: Tue Jun 17, 2014 7:14 pm

Value vs Text for Button

I will try it out.

Thanks!

Return to “Issues”