Skip to content
This repository has been archived by the owner on Jan 13, 2021. It is now read-only.

Commit

Permalink
Form tag now accepts 'submit' parameter. (#85)
Browse files Browse the repository at this point in the history
For overriding the Submit button text.
  • Loading branch information
srobbin committed Nov 8, 2018
1 parent f770170 commit 805a0ff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/dashboard.js
Expand Up @@ -341,6 +341,7 @@ router.get('records#new', '/sections/:id/records/new', findSection, async (ctx)
action: section.options.action || `https://formspree.io/${recipient}`,
subject: section.options.subject,
next: section.options.next,
submit: section.options.submit,
Form,
});
} else {
Expand Down
1 change: 1 addition & 0 deletions lib/models/section.js
Expand Up @@ -257,6 +257,7 @@ module.exports = (sequelize, DataTypes) => {
action: options.action || `https://formspree.io/${recipient}`,
subject: options.subject,
next: options.next,
submit: options.submit,
fields,
Form,
});
Expand Down
2 changes: 1 addition & 1 deletion views/records/_form_email.ejs
Expand Up @@ -7,6 +7,6 @@
<input type="hidden" name="_subject" value="<%- subject %>" />
<input type="hidden" name="_next" value="<%- next %>" />
<input type="text" name="_gotcha" style="display:none">
<input class="button" type="submit" value="Submit">
<input class="button" type="submit" value="<%- submit || 'Submit' %>">
</div>
</form>

0 comments on commit 805a0ff

Please sign in to comment.