getgrav / getgrav/grav-plugin-form
Ajax form not translating form already submitted text
- Dominant language
- PHP
- Stars
- 64
- Forks
- 80
- Avg merge
- 10h 13m
- Merged PRs (30d)
- 9
Description
I've created a website that has a modular page and on that page it has one module that contains a AJAX contact form. Works perfectly fine and the form does display validation messages and the date picker in the correct languages/format.
However, if you submit the form and then submit it again the form displays the text "This form has already been submitted."
I've traced this down to the 'form.message' variable in the file '[templates/partials/form-messages.html.twig](https://github.com/getgrav/grav-plugin-form/blob/develop/templates/partials/form-messages.html.twig)'. But I'm not familiar enough with the code to know where it's setting this variable so I can figure out if this is misconfiguration on my end or there's indeed a bug somewhere (I suspect a bug as everything else is being translated correctly).
Any suggestions on how to proceed so I can confirm if this is a bug?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with templates/partials/form-messages.html.twig and trace where the form.message variable is assigned for the already-submitted state. Compare that path with the translated validation and date-picker messages, then verify that submitting an AJAX form twice produces the corresponding translated text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- localization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100