skinny-azureS
Refine3y ago
8 replies
skinny-azure

I want to use useForm even though I don't have an ID for a user-profile edit

Hello refine community!
I want to build a UserProfile Form with the ease of the useForm hook Refine provides but I'm running into an issue where no request will be made when no ID is specified. So what I need is an edit page without an ID, since the user should only be able to edit his own profile. useForm is firing the network request when I have something like this:

const { formProps, queryResult } = RefineAntd.useForm({
  resource: 'profile',
  id: 1,
});


but not if I have something like this:

const { formProps, queryResult } = RefineAntd.useForm({
  resource: 'profile',
});


How would I do this?
Was this page helpful?