Note that there are some explanatory texts on larger screens.

plurals
  1. PO"Method mapping in object Forms" Error
    primarykey
    data
    text
    <p>I am trying to build a basic application using the Play Framework with Scala, I have tried to copy from the forms example supplied but have now got stuck.</p> <p>On refresh in the browser I am getting the following error.</p> <p><img src="https://i.stack.imgur.com/ruIZt.png" alt="enter image description here"></p> <p>I have been through all the files on the sample but can't seem to workout where the issue is, I am very new to this and the reason is probably very simple but I am afraid that this time Google has let me down.</p> <p>If someone is able to point me in the right direction I would be very grateful.</p> <p>Thanks</p> <p>The Code from the main files</p> <p>/Controllers/Submissions</p> <pre><code>object Submission extends Controller { val contactForm:Form[Contact] = Form( mapping( "title" -&gt; text, "firstname" -&gt; text, "lastname" -&gt; text, "gender" -&gt; text, "dob" -&gt; text, "mobile" -&gt; text, "landline" -&gt; text, "email" -&gt; text, "housenumber1" -&gt; text, "housename1" -&gt; text, "address11" -&gt; text, "address12" -&gt; text, "address13" -&gt; text, "address14" -&gt; text, "address15" -&gt; text, "postcode1" -&gt; text, "country1" -&gt; text ) ) def submit = TODO </code></pre> <p>/models/Contact</p> <pre><code>package models case class Contact( title: String, firstname: String, lastname: String, gender: String, dob: String, mobile: String, landline: String, email: String, housenumber1: String, housename1: String, address11: String, address12: String, address13: String, address14: String, address15: String, postcode1: String, country1: String ) </code></pre> <p>/views/application.scala.html</p> <pre><code>@(contactForm: Form[Contact]) @import helper._ @import helper.twitterBootstrap._ @title = {Overseas Application} @main(title) { @helper.form(action = routes.Submission.submit) { &lt;fieldset&gt; &lt;legend&gt;Personal Information&lt;/legend&gt; @inputText(contactForm("title"),'_label -&gt; "Title") @inputText(contactForm("firstname"),'_label -&gt; "First Name") @inputText(contactForm("lastname"),'_label -&gt; "Last Name") @inputText(contactForm("gender"),'_label -&gt; "Gender") @inputText(contactForm("dob"),'_label -&gt; "Date of Birth") @inputText(contactForm("mobile"),'_label -&gt; "Mobile") @inputText(contactForm("landline"),'_label -&gt; "Landline") @inputText(contactForm("email"),'_label -&gt; "Email") &lt;/fieldset&gt; &lt;fieldset&gt; &lt;legend&gt;Address 1&lt;/legend&gt; @inputText(contactForm("housenumber1"),'_label -&gt; "House Number (1)") @inputText(contactForm("housename1"),'_label -&gt; "House Name(1)") @inputText(contactForm("address11"),'_label -&gt; "Address Line 1 (1)") @inputText(contactForm("address12"),'_label -&gt; "Address Line 2 (1)") @inputText(contactForm("address13"),'_label -&gt; "Address Line 3 (1)") @inputText(contactForm("address14"),'_label -&gt; "Address Line 4 (1)") @inputText(contactForm("address15"),'_label -&gt; "Address Line 5 (1)") @inputText(contactForm("postcode1"),'_label -&gt; "Postcode (1)") @inputText(contactForm("country1"),'_label -&gt; "Country (1)") &lt;/fieldset&gt; &lt;div class="actions"&gt; &lt;input type="submit" class="btn primary" value="Submit"&gt; &lt;/div&gt; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload