The project i am working in allows logged in users to add a image to their profile by adding the image through a form. I was wondering if i could get the username automatically passed so the user doesn't have to type in his username when adding a image. I would like to get rid of the first input text box by making the site add it automatically. I know i can access it with @{session.get("displayName")} but don't know how to pass it with the form.
@main("addimage") {
@helper.form(action = routes.Images.processImageForm) { <!-- <----------**************************----------------->
<fieldset>
<legend>Add My Picture</legend>
@inputText(
addImageForm("creatorUsername"),
'_label -> "Add Name",
'_help -> "Please enter your display name",
'_error -> addImageForm.globalError
)
@inputText(
addImageForm("url"),
'_label -> "Add Image",
'_help -> "Please add your image-url",
'_error -> addImageForm.globalError
)
@inputText(
addImageForm("description"),
'_label -> "Add Description",
'_help -> "Please enter your Description",
'_error -> addImageForm.globalError
)
</fieldset>
<div class="actions">
<input type="submit" class="btn primary" value="Add Image">
<a href="@routes.Application.index" class="btn">Cancel</a>
</div> }