Skip to content
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

Able to submit disabled field value in redux form #4717

Open
gugvel opened this issue Feb 17, 2021 · 1 comment
Open

Able to submit disabled field value in redux form #4717

gugvel opened this issue Feb 17, 2021 · 1 comment

Comments

@gugvel
Copy link

gugvel commented Feb 17, 2021

Able to submit disabled field value in redux form

I am using redux form with the version of 8.3.0

facing one issue with disable field in the form

<Field
        name="firstName"
        component="input"
        type="text"
        disabled={myBoolean}
        placeholder="First Name"
      />

set to disable property to a particular field, it's working as expected.but open the developers tool in the chrome & remove the disable property from the element by manually and then edit the field in UI, the edited data still getting saved.

for my use case, need to save data only user can able to edit.
Any pointers on this?
And also provide some pointers, is there any possibilities to disable entire form based on condition?

Thank you

@Fox4148
Copy link

Fox4148 commented Mar 25, 2021

Well you can't deny a user from the front-end as the client will always be able to remove html, you can just simply put the field to disabled and not bother anymore as a front-end. You need to set-up authentication on server side to avoid unauthorized modification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants