Jump to:

2011 Posts in 1436 Topics by 620 members

Form Questions

SilverStripe Forums » Form Questions » Customizing output in email.

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

Page: 1
Go to End
Author Topic: 698 Views
  • me.yay
    Community Member
    14 Posts

    Customizing output in email. Link to this post

    Hi Silverstripers,

    i created my own contact form following the ssbits tutorial.

    This is the ContactForm_method() from the page_Controller

    new CheckboxSetField($name = "myField", $title = "myField Description", $source = array(
    "Choise1" => "Choise1", "Choise2" => "Choise2", "Choise3" => "Choise3"))

    The email-template is populated and $myField is available and shown in the emails that are send.

    When i receive the email $myField is replaced with 'Array( "Choise1" => "Choise1", "Choise2" => "Choise2", "Choise3" => "Choise3")'

    When i try to use a flat array ( Array("Choise1", "Choise2", "Choise3")) the first checkbox is allways preselected.

    How can i change the output from $myField during population of the email template?
    I need an output like: "choise1, choise2, choise3" without any php specific output like Array().

    Kind regards

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.