I know <SimpleForm>
is using redux-form.
I want to exclude specific fields from being sent when I submit the form.
When I edit my entity "User" the RestClient send a GET_ONE request and my API response this:
{
name: "Lior",
age: "100",
type: "Manager",
}
The <SimpleForm>
is like this:
<SimpleForm>
<TextInput source="name"/>
<TextInput source="age"/>
</SimpleForm>
When I send the form, the fields I see in the request are: name, age and type even when there is no "input" or "field" for type.
How can I avoid from "type" to be sent?
- The API has to return it, I need it for
<Show>
and more.. - I don't to hard coded my RestClient just to remove the "type" because it is not happening just in "User" model but in many other models.
- I don't want to "usset" it on the API controller side.
Thanks!