Results 1 to 4 of 4

Thread: loadFormField

  1. #1
    User
    Join Date
    01-25-10.
    Location
    France
    Posts
    61

    Default loadFormField

    Hello,
    I am developping specific hooks in order to manage the field contents of a form
    loadFormField : for initialising the contents
    validateFormField : for validating the contents

    When the form is displayed : only the first hook is activated, that' good
    when the form is submitted : the two hooks are activated : the validate one and the load one

    I don't understand at all why the loadFormField hook is activated ?
    Could you help
    Thanks
    Sharing and growing

  2. #2
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: loadFormField

    because the form is displayed again after submission...

  3. #3
    User
    Join Date
    01-25-10.
    Location
    France
    Posts
    61

    Default Re: loadFormField

    Thyon ,
    ah Ok ,
    thank you for your answer,

    but :
    How to distinguish the first passage and the second one :
    1) one treatment when the form is displayed
    2) another treatment when the form is validaded (or : how to distinguish the passage order in the loadFormField hook ?

    regards,
    Sharing and growing

  4. #4
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: loadFormField

    load is first as far as I know, look in the widget control for the hook. Load is the loading of the control, as you can manipulate the select contents dynamically or do this kind of stuff, that has to happen first, then the control is submitted and then validated... normally you don't to validation in the load form field. you might change options based on others... I used it to add dynamic labels to each option, e.g. add how many free seats there are for an option... (formauto extension, where I requested the original hooks to be added)

Bookmarks

Posting Permissions

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