-
-
Notifications
You must be signed in to change notification settings - Fork 245
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
[Question] set submit-button-label in AutoForm #155
Comments
If you still want to use fully automatic Example: import SubmitField from 'uniforms-unstyled/SubmitField'; // <- !
const MySubmitField = props =>
<SubmitField value="Submit Label Here" /> // It's <input type="submit" />
;
// Later...
<AutoForm schema={...} onSubmit={...} submitField={MySubmitField} /> If you are using not-so-fully-automatic <AutoForm schema={...} onSubmit={...}>
<AutoField ... />
{/* ... */}
{/* Like this */}
<MySubmitField />
{/* Or directly */}
<SubmitField value="Submit Label Here" />
</AutoForm> |
I'll close it. If you have more questions, just let me know. |
@radekmie Thanks man. I test it and works well. |
I tried it like this: import JSONSchemaBridge from 'uniforms-bridge-json-schema';
import {AutoFields, AutoForm, ErrorsField, LongTextField, SubmitField} from 'uniforms-material';
// ...
const strategyAddSchema = {
title: 'Strategy',
type: 'object',
properties: {
// ...
},
required: ['config', 'label', 'name', 'user', 'version'],
};
const strategyAddBridge = new JSONSchemaBridge(strategyAddSchema, () => null);
const strategyAddForm = (
<AutoForm
schema={strategyAddBridge}
onSubmit={async (model: StrategyEntityProps) => {
// ...
}}>
<AutoFields />
<ErrorsField />
<SubmitField value={'Test'} />
</AutoForm> But the submit button still shows text "Submit" instead of "Test". @radekmie, have I missed something? 🤔 |
Hi @bennycode. It depends on your theme - in |
|
Hi @radekmie,
I want to customize submit button in an Autoform. Now it's show "Submit Query" for button label.
I also see this and this but can't set submit-button label.
It's my try:
Can you help me to do this?
The text was updated successfully, but these errors were encountered: