-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client-side submit is not serializing button names and values #158
Comments
@netdesignr, we published a fix on v1.5.3. However, it will only work out-of-the-box if you use the same Before the fix, we had an To make this behavior work, we had to add an If you don't want to use the same |
@danielweinmann I will try it out today. Thank you! |
@danielweinmann to confirm that this bug fix release did fix the issue. Thank you! |
@danielweinmann Either this has regressed sometime in the past year, or I am holding the thing wrong 😕 I have a component like this: export function SettingsForm({ ...props }: SettingsFormProps) {
const title = "Edit settings"
return (
<div>
<div className="flex space-x-2 items-center">
<h1 className="text-3xl">{title}</h1>
</div>
<Form
inputTypes={{
secret: "password",
}}
className="w-96"
schema={configSchema}
{...props}
>
{({ Field, Button, Errors }) => (
<>
<Field name="name" />
<Field name="secret" />
<Field name="url" />
<Errors />
<div className="flex space-x-2 items-center mt-3">
<Button type="submit" name="_action" value="save" />
<Button
type="submit"
name="_action"
value="delete"
className="bg-red-500 hover:bg-red-700"
>
Delete
</Button>
</div>
</>
)}
</Form>
</div>
)
} where At first, I was using a custom I'd be interested to know what the manual testing on #159 was, so I can make sure I'm using this feature as intended. Also, I don't think I'm doing anything that would require the manual step alluded to here:
but if I am, I'd love to know what it is and what's required. 🙂 Thanks! |
Let's say I have the following form:
If I try to submit it with JS disabled, the field
intent
is serialized and submitted with valueupdate
. However, if JS is enabled, it is not.I did some testing, and is seems the problem lies at this line. We should investigate it and make sure all inputs are always serialized and submitted when the form is valid, regardless of:
Original issue on domain-functions repo. Thanks for reporting this, @netdesignr! 💪🏼
The text was updated successfully, but these errors were encountered: