Skip to content

Continue improving ajax-and-forms #63

Open
@ajpiano

Description

@ajpiano

@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 Content-review: $.ajax() #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 phoneNumberRegex or 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

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions