Skip to content

[Form] Update dynamic_form_modification.rst #18228

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

Merged
merged 1 commit into from
Jun 15, 2023

Conversation

YannickDurden
Copy link
Contributor

Hi mates,

The JavaScript parts use jQuery and, IMHO, it's not relevant. Also, performing an Ajax request is easier since fetch is available for JavaScript. That's why I propose this piece of code.

Also, to use form.getAttribute('action') , you must manually define the URL called by the form. To do this, I give a third parameter to createForm and I set the action value in SportMeetupType with $builder->setAction()

Yannick

Hi mates,

The JavaScript parts use jQuery and, IMHO, it's not relevant. Also, performing an Ajax request is easier since fetch is available for JavaScript. That's why I propose this piece of code.

Also, to use `form.getAttribute('action')` , you must manually define the URL called by the form. To do this, I give a third parameter to `createForm` and I set the action value in `SportMeetupType` with `$builder->setAction()`

Yannick
@carsonbot carsonbot changed the title Update dynamic_form_modification.rst [Form] Update dynamic_form_modification.rst May 2, 2023
@javiereguiluz javiereguiluz requested a review from weaverryan May 2, 2023 15:40
@javiereguiluz javiereguiluz added this to the 6.2 milestone Jun 15, 2023
@javiereguiluz javiereguiluz merged commit cb377af into symfony:6.2 Jun 15, 2023
@javiereguiluz
Copy link
Member

Yannick, what a nice contribution! It's true that the time has come to update our JS examples to to pure/vaniall JS instead of jQuery. Thanks for doing that here.

Congrats also on your first Symfony Docs contribution 🎉

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

Successfully merging this pull request may close these issues.

3 participants