ITADN

Modular Forms: Combining multiple forms to be submit in a single handle submit

#291Closedamirsaf1 创建于 2025-06-06
question
A
amirsaf1commented
I am writing on SolidJS and trying to figure out how to combine two handlesubmit into a single handlesubmit for inserting data into Auth Table and Public Table in Supabase. I tried submitting both into one handle submit but none were inserted into any table. Also, tried nesting handleUserSubmit into handleAuthSubmit but only handleAuthSubmit was successfully able to insert auth data (email and password) into Auth Table. Has anyone figure out how to do multiple submissions in one go? Without modular forms and without SSR, I able to submit both in one go, but with modular forms and SSR, things are a little bit complicated. const handleAuthSubmit: SubmitHandler = async (authvalues, _) => { const { error } = await authsubmit(authvalues) if (error) { throw new FormError(error) } const handleUserSubmit: SubmitHandler<UserForm> = async (uservalues, _) => { const { error } = await usersubmit(uservalues) if (error) { throw new FormError<UserForm>(error) } }
关闭于 2025-06-11 4 条评论