Results 1 to 4 of 4

Thread: [x_dma_niceerrors] Indiviual error messages in forms

  1. #1
    New user
    Join Date
    08-10-09.
    Location
    Datteln, DE
    Posts
    4

    Default [x_dma_niceerrors] Indiviual error messages in forms

    Hello!

    I am glad to announce a new small extension, which allows you to define individual error messages for form fields in frontend forms (forms made with the form generator). With the help of an inserttag you can also decide where exactly you like to place the error messages. Using "error ids" you can group error messages to accomplish the display of just one message for similar errors (e.g. "Please fill in all mandatory fields"). You can even display different messages for missing mandatory fields and failed validations (e.g. "Please tell us your e-mail address" vs. "Please fill in a correct e-mail address").

    After installing this extension, you have to change the templates "form.tpl" and "form_widget.tpl" - examples are found in "TL_FILES/dma_niceerrors". Basically you have just to turn off the system error messages by changing "$this->generateWithErrors" to "$this->generate" in form_widget.tpl and insert "{{formerrors::form_id}}" into form.tpl where you like the errors to appear.

    The extension can be found in the extension repository:
    http://www.typolight.org/extension-list ... 93.en.html

    We are working with it since some months, so i think it can be considered stable - although i'd like to wait for feedback before calling it officially stable.

    Hope it will help someone!
    Carsten Kollmeier
    Twitter: staenomat / Blog: Punk 2.0 / Donate

  2. #2
    Experienced user
    Join Date
    06-10-09.
    Location
    Atlanta, Georgia
    Posts
    611

    Default Re: [x_dma_niceerrors] Indiviual error messages in forms

    Carsten - this sounds like a great extension! I'll give it a shot one of these days.

  3. #3
    User
    Join Date
    03-06-10.
    Posts
    54

    Default Re: [x_dma_niceerrors] Indiviual error messages in forms

    i like the module you have made, but is it als stable at typolight 2.8.1?
    much thanks
    Tieme

  4. #4

    Default Re: [x_dma_niceerrors] Indiviual error messages in forms

    Hi ,
    thanks for this Ext.
    but i can"t manage to use it.
    i'm using TL 2.8.1

    i did the install, and modified the form.tpl like in the example
    Code:
    <div class="error">{{formerrors::<?php echo $this->formId; ?>}}</div>
    (in your ex, there wasn't the "echo").
    and i modified the form_widget.tpl also like your ex.

    in the BE, i created a form with a few mandatory fields and i used "Empty mandatory field: Error message" and "Empty mandatory field: Error ID" (this one is the same for all my mandatory fields).

    but it doesn"t display any errors.
    did i make something wrong ?
    did it work with TL 2.8.1 ?

    thanks !

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
  •