question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update field value according to another field

See original GitHub issue

Hi,

I am having an issue with chained selects. Is there any way to change values of other fields according to another field’s value?

I created a sandbox so that it is easy to look at. If you select a currency from first select, let’s say “usd”, the country select doesn’t select any option. As you can see in the state of the form, “country” value is still “IE” (the previous value).

I would like to select the first country available for a given currency. So, I thought removing <option /> it would work but it doesn’t. Any idea how to solve this without wrapping the form and send data to its parent component? Is there any way to solve this just using RFF?

Thanks.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

12reactions
erikrascommented, Oct 11, 2018

As you can see in the state of the form, “country” value is still “IE” (the previous value).

Seems like this could be handled with a Declarative Form Rule, no?

8reactions
jferrettibokecommented, Oct 11, 2018

In case someone is interested how I solved my needs, check this sandbox out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Update one field with value from another field in a table where ...
mysql - Update one field with value from another field in a table where the field values themselves are keys - Stack Overflow....
Read more >
How to Update a Column Based on a Filter of Another Column
Learn how to update a column based on a filter of another column. This tutorial will cover ways to update rows, including full...
Read more >
Solved: Is it possible to update the value in one field ba...
Solved: Hi experts, As said in the subject, is it possible to update the value in one field based on the update in...
Read more >
Solved: How can we update one field value based on other f...
How can we update one field value based on other field value using Business Rules. Go to solution.
Read more >
field update from the value of another field - Zoho Cares
Hello,I need to do a field update from the value of another field, but i don´t know how can i do it. In...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found