Results 1 to 4 of 4

Thread: FormPanel from existing markup

  1. #1
    Sencha User
    Join Date
    Mar 2007
    Posts
    580

    Default FormPanel from existing markup

    Hi,

    Is it possible to create a FormPanel or a BasicForm from existing html form markup?
    In Django(python) you define a model and it automatically generates the form markup and handles validation for you.
    I'm trying to use ext to transform this markup to an extjs form and use client side validation and ajax submit without creating the form manually and without changing the server side logic.
    I might need to add css classes to form fields in the django template so ext can recognize them.


    Thanks

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    Why would you want to go this roundabout route of generating some HTML, and then writing some very complex Javascript which crawls all over it, and creates some Ext objects?

    That is just all too difficult and complicated.

    It's SO easy to just create a form, so just do that.

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Posts
    580

    Default

    Why would you want to go this roundabout route of generating some HTML, and then writing some very complex Javascript which crawls all over it, and creates some Ext objects?

    That is just all too difficult and complicated.

    It's SO easy to just create a form, so just do that.
    because of DRY. In django you create a model and gets a form with validation for free.
    No room for mistakes. You change your model and the form reflects this change.
    If I can get ext to automatically understand the django forms I get client validation as well.

  4. #4
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246

    Default

    You convert fields by creating an Ext field with an applyTo, el or transform config option.
    These fields can either be added to a BasicForm or moved to a FormPanel.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •