Results 1 to 5 of 5

Thread: one form for different field values

  1. #1
    User
    Join Date
    11-24-13.
    Posts
    44

    Default one form for different field values

    Hi,
    in one website I need many forms, all equal, but I need to add a different information for each one in the email sent.
    I know that I can use the processFormData hook, but I don't know how to pass the information to the form when I insert it in a page.

    Any help? Thank you!

  2. #2
    User Andreas's Avatar
    Join Date
    07-11-09.
    Location
    Mönchengladbach
    Posts
    499

    Default

    Maybe a case for the extension [notification_center].
    Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
    Amazon wishlist

  3. #3
    User
    Join Date
    11-24-13.
    Posts
    44

    Default

    I had another idea: I create a custom extension that adds a "To:" field in the 'form' tl_content, and then use it in processFormData to set to field.

  4. #4
    User
    Join Date
    11-24-13.
    Posts
    44

    Default

    Quote Originally Posted by DavideR View Post
    I had another idea: I create a custom extension that adds a "To:" field in the 'form' tl_content, and then use it in processFormData to set to field.
    Uhm... doubt: can I read id and class of the tl_content 'form' inside processFormData?

  5. #5
    New user
    Join Date
    01-30-17.
    Posts
    5

    Default

    Yes, you could use class ContentModel to read/write data from/to table tl_content. You need to usea contentModel object in your class (the class you write for using with processDataForm Hook):

    Code:
    $objContent = new ContentModel();
    And you can use the properties and methods of this class. For example:

    Code:
    $objContent->id
    Maybe do you ask about CSS id/class? I guess the same explanation applies here:

    Code:
    $objContent->cssID
    Last edited by infomiquel; 01/30/2017 at 13:46.

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
  •