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.

Selector for form[formName].registeredFields

See original GitHub issue

I have a use case where I’d like to be able to get a list of all the fields that have currently been registered on a form.

Basically I’m trying to do a kind of fancy wizard flow that necessitates having a list of all the field names, and I’d like to avoid typing them out on both the <Field>s and in the container where the business logic is happening (keeping them in sync would be problematic as the form grows)

I don’t see a selector for form[formName].registeredFields – is that intentional? If I make my own, is the field name likely to change?

Thanks!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

2reactions
gustavohenkecommented, Feb 25, 2017

No, you’re right @rizedr. There are no props for this either.

Thinking about this a little better… I recently developed a custom forms feature. The list of fields include whether the field is required, whether it requires emails/dates/etc. So I base my rules on these instead of something else. I highly recommend you guys to do something like this. It’s probably a bad idea to create dynamic rules based on fixed fields.

1reaction
gustavohenkecommented, Feb 22, 2017

I don’t see a selector for form[formName].registeredFields

This is because one doesn’t exist.

I marked it as an enhancement, but please follow the template the next time you open an issue here. It was made for a reason.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Selectors - Redux Form
redux-form provides a set of useful Redux state selectors that may be used in any part of your application to query the state...
Read more >
reactjs - How to access pristine prop of reduxForm from inside ...
registeredFields.title : Question: Is there a way to get pristine property of my form inside another component or inside redux state?
Read more >
How to use the redux-form.getFormValues function in ... - Snyk
To help you get started, we've selected a few redux-form.getFormValues examples, based on popular ways it is used in public projects.
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