menu
Channels
Team
Posts
Chat
Members
Info
down-caret
·13d·Pinned# General

Github Diccussion

Hi guys, We are moving more towards Github Discussion for Q&A, please make your way towards there. https://github.com/react-hook-form/react-hook-form/discussions …

thumbsup
1
message-simple
0

One input depends on another

Hello. Let's say you have two dropdown inputs, Country and City. The City dropdown is populated based on which Country is selected (e.g. Los Angeles and New York would be in the dropdown if USA is selected). How would you get the value of the Country input to the City input so…

thumbsup
1
message-simple
2

Remember a value from a toggled show/hide form field

When form fields disappear and then reappear again (toggled by the state of another), what is the best way to remember what the previous value was (if it was previously toggled on) and stick it in?

thumbsup
0
message-simple
46
Deleted·6d# Help

Form with react native

Hi guys, I am needing to know why do I add if the controller component in my react native project this show me the next error: Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but go: undefined, this is…

thumbsup
0
message-simple
8

Suggestion to avoid community fragmentation

@bluebill1049, I think it's great that you enabled the Discussions on GitHub, that way the code and the talk is in the same place. However, people are still posting questions here, that may be already answered there, or users who search GitHub (probably more than those who…

thumbsup
1
message-simple
2

onBlur mode

Hi, I started using react hook forms, but now I'm facing an issue and I didn't find a way to solve it. I have some inputs on my form and I'm using it as mode: onBlur. …

thumbsup
0
message-simple
1

Validation with yup not kicking in for mui elements

I am the following this example from docs: https://react-hook-form.com/advanced-usage#CustomHookwithValidationResolver As stated, I created the hook, passed my validation schema to it. Then passed the resolver to useForm hook. I matched the name on validation schema with the…

thumbsup
0
message-simple
3

How to trigger validation on append/remove

I'm using useFieldArray with some validation on the array itself (users must add a minimum of items or a maximum of items). I want this to be validated/revalidated when the user adds or removes items. Any best practice on how to do this? Is it better to useEffects like…

thumbsup
0
message-simple
11

Help to useFieldArray in react-hook-form

Hi guys, I'm working on react-hook-form. With form defaultValues = { firstname: 'Kha', lastname: 'Le', skill: {typescript: 'hight', javascript: 'highest'}}. …

thumbsup
0
message-simple
0

Multiple forms using same formContext

Hi, how can i use different methods for multiple forms like const methods = useForm() and const {methods: splitMethods} = useForm(). is there any way to use like this instead of const {register: register2} = useForm()?

thumbsup
0
message-simple
1

form is revalidating on "blur" even though revalidationMode is "onChange"

hi! i have a form that uses the default validation and revalidationMode (so validate onSubmit, revalidate onChange). all my fields are required. however, i notice that after submitting once, if i focus on an empty input (with an error) and then click out of the input, the error…

thumbsup
0
message-simple
4