Results 1 to 8 of 8

Thread: Custom form

  1. #1

    Default Custom form

    Hi.
    Is there a way to make custom form in a way like:
    - I don't wan't that the form is auto generated. I wan't to call manully every input of given form (I was allways impresed how catalog extension works, where you can simply call every value from catalog input list).

    Thank you for your advice
    Web design agency - EDsolution.si Izdelava spletnih strani

  2. #2
    User
    Join Date
    04-27-10.
    Posts
    134

    Default Re: Custom form

    Hey

    Not too sure, but have a quick read of one of my posts viewtopic.php?f=6&t=2888
    There's a bit about using hooks to generate form stuff, maybe that can help in some way.
    Haven't studied it yet in detail or try my own so can't help much more than that sorrry

  3. #3

    Default Re: Custom form

    Thank your for your replay. But I think (I have only basic skills of programming) that this is not for displaying in FE but more for use in developing modules when you need form hooks. Meybi i'm wrong


    To clear issue...what I would like to achive is in the code below. This is an example from cataloge when you can call every data you want.


    Code:
    <?php if (count($this->entries)): ?>
    <?php foreach ($this->entries as $entry): ?>
    <div class="label"><?php echo $entry['data']['field_name_in_DB']['label']; ?></div>
    <div class="value"><?php echo $entry['data']['field_name_in_DB']['value']; ?></div>
    <?php endforeach; ?>
    <?php endif; ?>
    Web design agency - EDsolution.si Izdelava spletnih strani

  4. #4
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,284

    Default Re: Custom form

    Hi wotanskrieg,
    Quote Originally Posted by wotanskrieg
    Is there a way to make custom form in a way like:
    - I don't wan't that the form is auto generated.
    You can do this for example by using the form field of type "HTML". There you can build your form manually as you want.
    Contao Community Moderator
    → Support options

  5. #5

    Default Re: Custom form

    Thank you for the tip xchs.

    But what else it is need to be done, that the value is send to email. If I choose field type Html code and make input type="text" the value isn't send to email, but If I create submit btn in html code everything is submited ok.

    Any clue?
    Web design agency - EDsolution.si Izdelava spletnih strani

  6. #6
    New user
    Join Date
    10-10-12.
    Posts
    2

    Default Re: Custom form

    up!
    hi everybody!

    anybody have the solution for this problem??

    In a form when I add a input text in html, this not appear in e-mail.

    Thanks!

  7. #7
    New user
    Join Date
    10-10-12.
    Posts
    2

    Default Re: Custom form

    up!

  8. #8
    User
    Join Date
    06-19-09.
    Posts
    328

    Default Re: Custom form

    just use the loadFormField hook

    each input element extends the Widget class

    you can really do whatever you want just by using php code
    Consulenza Contao CMS https://www.intco.it

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
  •