Hi guys,
I am new to SilverStripe and just finished/uploaded a SilverStripe site to a server. i have two issues, first is about the contact form and targeting each input field for customisation. i have used a custom form template and i needed to access each input field. i tried $Fields.dataFieldByName(name) and $Fields.FieldByName(email) but they don't work. i ended up using <% control Fields %> $Field <%end_control> which does not give me individual unique styling option for each of my form $Fields. this is what i like to do:
<div class="input-field col s12">
<i class="material-icons prefix">account_circle</i>
$Fields.dataFieldByName(name)
<label for="name">Name</label>
</div>
the other question is about me getting an email after form submission. i have used this:
$email = new Email();
$email->To = "me@myemail.co.nz";
$email->From = $data['email'];
$email->Subject = "A message from : ".$data['name'];;
$email->Body = $data['message'];
$email->send();
this works fine on my localhost but now that i have uploaded the project on my Digital Ocean server it does not send me emails upon form submission. am i missing something here?
thank you for your help
Beshad