Skip to content

Ability to hide the submit button when the form is set to autosave #893

Answered by radekmie
bmartin1134 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @bmartin1134. Have you tried the submitField prop? You could do something like this:

function Null() {
  return null;
}

function MyAutoForm(props) {
  return <AutoForm submitField={props.autosave ? Null : undefined} {...props} />;
}

And as for the other thing: instead of closing the modal on submit, you can add a custom "close modal" component. To make things easier, it can replace the SubmitField - see the example above.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by radekmie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants