managerial-maroonM
Refine11mo ago
28 replies
managerial-maroon

useForm redirect

I want to customise the useForm redirect, I need it to use slug instead of id, can you please show me how to do that
my current useForm
    const {
        saveButtonProps,
        refineCore: { formLoading, queryResult, onFinish },
        register,
        control,
        formState: { errors },
        setValue,
        getValues
    } = useForm({
        refineCoreProps: {
            meta: {
                extend_url: 'edit',
            },
            action: "edit",
            redirect: "show",
            queryOptions: {
                  enabled: true,
                  enabled: !!canAccess?.can,
                },
        },
    });
Was this page helpful?