Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7969377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:13:41+00:00 2026-06-04T07:13:41+00:00

In my index method I render a basic login form, that I sent to

  • 0

In my index method I render a basic login form, that I sent to my index.scala.html:

/**
 * Main entry method for the application
 */
public static Result index() {
     return ok(views.html.index.render(form(Application.Login.class)));
}

In the file index.scala.html: I have defined the form parameter:

@(form: Form[Application.Login])

@main(title = "myTitle") {
    <h2>Testing app</h2>
}

So, in this file I call the parent template by @main(…). But how to pass the form to my parent template? I have tried the following:

@(form: Form[Application.Login])

@main(title = "myTitle", form) {
    <h2>Testing app</h2>
}

and the in my main.scala.html the following:

@(title: String, form: Form[Application.Login])(content: Html)

But this is not working, I get the following error message:

not enough arguments for method apply: (title: java.lang.String, form: play.data.Form[controllers.Application.Login])(content: play.api.templates.Html)play.api.templates.Html in object main. Unspecified value parameter form.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:13:41+00:00Added an answer on June 4, 2026 at 7:13 am

    As Julien stated this is working:

    @main(title = "myTitle", form = form) { … } or just @main("myTitle", form) { … } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class that wraps List<> I have GetValue by index method: public
there's a simple form in Lift framework and a Class with render method that
I have a method which uses an index located in a specific directory. public
Create a method named getNextProjectIndex() that returns an int that gets the next index
I need help with creating a C# method that returns the index of the
I am trying to submit a form with method GET and action index.php?id=3. The
In my controller: @RequestMapping(value = /, method = RequestMethod.GET) public String index() { return
index.php: <form action=update_db.php method=post> <?php require_once 'modules/' . $currentModule . '.php'; ?> </form> modules/
Here is my index.html.erb : <%= render :action => 'new' %> <% unless @posts.empty?
Ok so I have a show method that tries to render a layout and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.