# Set button value with logic

**URL:** <https://community.feathery.io/t/set-button-value-with-logic/1213>\
**Category:** Support\
**Created:** [December 23, 2024, 4:15pm UTC](https://community.feathery.io/t/set-button-value-with-logic/1213 "2024-12-23T16:15:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wanschi](https://avatars.discourse-cdn.com/v4/letter/w/7ab992/32.png) [@Wanschi](https://community.feathery.io/u/Wanschi)\
**Post date:** [December 23, 2024, 4:15pm UTC](https://community.feathery.io/t/set-button-value-with-logic/1213/1 "2024-12-23T16:15:36Z")

</div>

Hello,

We have a NPS survey which shows 11 Buttons representing values between 0 and 10 in a row.  
We want to send mails where these 11 buttons are already shown. Each with an url with individual query param (e.g. ?nps=7) to Feathery. When a user clicks one of the button in the mail the logic should preselect the button in the survey form. Is that possible? It seems that it’s not possible to set button values with logic.

---

<div class="post-metadata">

**Author:** ![Kenny](https://avatars.discourse-cdn.com/v4/letter/k/90db22/32.png) [@Kenny](https://community.feathery.io/u/Kenny)\
**Post date:** [December 23, 2024, 6:43pm UTC](https://community.feathery.io/t/set-button-value-with-logic/1213/2 "2024-12-23T18:43:44Z")

</div>

Hello Wanschi,

What I suggest is to set the field values of your form using URL parameters. Each button in your email can correspond to a value for the field, which will be passed through the URL parameters.

For example, if the field ID where you want to reflect the customer’s choice is named `ratingField`:

- Assign the URL to the button 1,  
`https://form.feathery.io/to/<form-slug>/?ratingField=1`
- When the user clicks the button for “1,” they will be redirected to this URL, and the value `1` will be prefilled in the `ratingField`.

To implement this:

1. Customize the URLs for each button in your email to match the values you want to pass.
2. Use the URLs in your email buttons, ensuring each corresponds to the desired value for `ratingField`.

You can read more about this approach and other options for prefilling form fields in the Feathery documentation:

[Set Field Values - Feathery Docs](https://docs.feathery.io/platform/form-fields/set-field-values)

---

<div class="post-metadata">

**Author:** ![Wanschi](https://avatars.discourse-cdn.com/v4/letter/w/7ab992/32.png) [@Wanschi](https://community.feathery.io/u/Wanschi)\
**Post date:** [December 23, 2024, 7:04pm UTC](https://community.feathery.io/t/set-button-value-with-logic/1213/3 "2024-12-23T19:04:24Z")

</div>

Hi Kenny,

Thanks for getting back to me. Is there an option to show a page with buttons in Feathery and preselect the one which was pressed in the mail?

We want to show the page because we want to give the users a chance to change the value in case he pressed the wrong button in the mail.

---

<div class="post-metadata">

**Author:** ![Kenny](https://avatars.discourse-cdn.com/v4/letter/k/90db22/32.png) [@Kenny](https://community.feathery.io/u/Kenny)\
**Post date:** [December 23, 2024, 7:18pm UTC](https://community.feathery.io/t/set-button-value-with-logic/1213/4 "2024-12-23T19:18:39Z")

</div>

Hi Wanschi,

Just to confirm, are you asking for a form that pre-populates with the values the user selected or filled out in the email they received?

I also want to know what you have used to send the NPS survey to the e-mail of the users and where it will be saved.
