jquery / jquery/learn.jquery.com
Continue improving `ajax-and-forms`
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 915
- Forks
- 471
- PR merge metrics
- No merged PRs in 30d
Description
@connormontgomery's improvements have been really useful, but this can probably use even more fleshing out. This could include some of the following improvements:
- "Ajaxifying" existing forms
- Form Plugin - to follow up the discussion in #38, I actually think it's worthwhile to show how the plugin can be useful in doing the above ("ajaxification") and how doing so provides a considerably more familiar flow to form authoring than just serializing data and shoving it off to a url you type into your JS: (eg.
$.post("form_process.php", $form.serialize()) - Serialzing a form to an object (https://raw.github.com/cowboy/jquery-misc/master/jquery.ba-serializeobject.js, explain why this is left out of core (http://bugs.jquery.com/ticket/11002))
- Augmenting a form's data during a submit handler (for both traditional and AJAX submissions)
- Client side validation (all these changes might merit moving "validation" into its own article)
- discuss how to leverage native techniques before just defaulting to using JS.
- using a validation framework (jQuery Validation or a hand-rolled one) (in order to keep yourself from having the same
phoneNumberRegexor whatever similar actual validation logic dupliated throughout your app) - use of native validation APIs ?
- collecting and displaying client side errors (good vs. bad UX)
- Using deferreds to incorporate AJAX-validation of form data on the client side with client-side only checks
- Do some ajax validation and then do a normal form submit! (expand on http://jsfiddle.net/ajpiano/5tCp3/6/)
Stylistically, we should also move away from overly effusive phraseology ("extremely easy") and do our best to keep the tone focused on how it works, not how you'll feel as a user.
In addition, we should move the section on prefilters as per #62.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ajax-and-forms article, then review the discussion in #38 and the prefilters move requested in #62. Compare the referenced Form Plugin, serialize-to-object example, validation resources, and deferreds example before planning the article changes. Done means the requested form and validation topics are covered, the tone is focused, and the prefilters section has moved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jquery
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100