Jump to:

2011 Posts in 1436 Topics by 620 members

Form Questions

SilverStripe Forums » Form Questions » problem with populateTemplate

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 900 Views
  • bebabeba
    Community Member
    192 Posts

    problem with populateTemplate Link to this post

    I read some post how to send mail. My problem is about populateTemplate:

    Object::__call() Method 'populateTemplate' not found in class ''
    At line 199 in E:\_silverstripe_cms\silverstripe\sapphire\core\Object.php

    This is what I wrote:

    function SendMail() {   
    // Create fields
    $fields1 = new FieldSet(
    new TextField(
    $name = "nome",
           $title = "Nome*:",
           $value = ""
    $actions = new FieldSet(
    new FormAction('doSendMail', 'Invia')
    return new Form($this, 'SendMail', $fields1, $actions);

    function doSendMail($data, $form)
          $body="ciao ciao";
          $e = new Email($from, $to, $subject, $body, "","","");

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.