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 7872743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:18:03+00:00 2026-06-03T02:18:03+00:00

Hello I will start by presenting my code. @defining(addPostForm){formId => @main(Add a blog post.)

  • 0

Hello I will start by presenting my code.

@defining("addPostForm"){formId =>
@main("Add a blog post.") {
    <h1>Add a blog post</h1>

    @errors

    @form(routes.Application.addPost, 'id -> "@formId") {
        @inputText(name = "content", required = true)
        <input type="submit" value="Create">
    }

    <script type="text/javascript">
        $("#@formId").validator();
    </script> 
}
}

Why is it that the @fromId in the @form won’t be evaluated by play? This is a snippet of the generated html page.

<form action="/addPost" method="POST" id="@formId">

But later in the page it is working fine as this is generated.

<script type="text/javascript">
    $("#addPostForm").validator();
</script> 
  • 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-03T02:18:04+00:00Added an answer on June 3, 2026 at 2:18 am

    I think it does not work because you already in a Scala code section, try this :

        @form(routes.Application.addPost, 'id -> formId)
    

    The later code is not included in a code section, so it works as expected.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I will start with a quick Hello since it's my first post on stackoverflow.
Hello I will start by an apologize for my english I am not to
Hello Ruby/Rails/Merb developers! Im currently working on a web project that will have a
Will this leak memory? char *str = Hello/World; char *pos = rindex(str, '/'); *pos
Will this validate in XHTML? <span>hello<span>world</span></span>
Hello I have the following code namespace ConsoleApplication2 { class Program { static void
Hello good fellas i'm sure everybody is cool.I'm about to start a tutorial about
Before i start i will divide the problem into two parties: PART 1 :
Hello stackoverflow guru's! This is my first post after having used the site for
Hello is it possible to start like too many activities during the runtime of

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.