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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:11:40+00:00 2026-06-04T21:11:40+00:00

Can find nothing on the net re: this issue. I’m looking at the code

  • 0

Can find nothing on the net re: this issue.

I’m looking at the code on github for select, checkbox and friends but am completely missing the boat as to how one gets default selected/checked working. What is the deal here?

The case class on which form in question is based has a default value for the problem field, but that does nothing. Do I need to apply a default value to the Form(mapping(‘foo-> boolean)) entry? If so, how?

Ignorance is not bliss, drop some knowledge if you’ve got it…

Thanks

  • 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-04T21:11:41+00:00Added an answer on June 4, 2026 at 9:11 pm

    Not ideal, but see this thread for one way to achieve default values.

    @inputRadioGroup(
      field = _form("payByCheck").copy(
        value=_form("payByCheck").value.map{Some(_)}.getOrElse(Some("false"))
      ), 
      options("false"-> "No", "true"-> "Yes"), 
      '_label-> "Pay By Check?"
    )
    

    The problem here is that we have completely decoupled the model from the form. A better approach would be for the form mapping to somehow contain default values from these scala 2.9.x impenetrable black boxes known as case classes.

    Alas, not happening it seems, would love to hear otherwise. Chime in if you’ve got the goods, only provided this answer as it’s the only thing I’ve found during the last 2 pointless hours of search, trial, and error 😉

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

Sidebar

Related Questions

I can find the definition files at http://www.php.net/~helly/php/ext/spl/... but I want to extend DirectoryIterator
I have been looking everywhere for this answer. I can't find any solution. I
I wanted to try out an example you can find here: http://php.net/manual/en/function.include.php , but
Every example I can find is in C++, but I'm trying to keep my
I am struggling few hours with this and can't find a solution to the
This is silly, but i can't understand how to do it. Checked out from
I did do some googling and searching on this site but did not find
I have weird problem with this code $('img').hover(function(){ var $cap = $(this).parent().find('.cap'); window.setTimeout(function(){$cap.stop(true,false).animate({bottom:164},500)},500); },function(){
So this seems pretty basic but I can't get it to work. I have
Where can find resources about best practices for SharePoint programming? I am talking about

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.