therefore, I am using a playback structure, and I am trying to create several submit buttons that invoke one form:
So, I have a list of lines, and I would like to create two buttons that will return to the server and complete the event, the first will send the second, cancel. What I would like to do is set the original value equal to what is selected in the foo select object. How can I do it? Do I need to create javascript even if it is fired from the form and then get var inside this function and then hide the submission? Im not 100% familiar with the playback platform and scala, so I'm not sure if I can somehow get it inside this code without using the new method.
@(myList: List[String], theForm: Form[Obj]) @import helper._ @main("myVar Controller") { <select id="foo"> </select> <table border="1"> <tr> @for(myVar <- myList) { <td>@myVar @form(routes.Application.method()) { <div id="hiddenForm" style="visibility:hidden"> <input type="text" name="commandID" id="commandID" value="10" /> //Send Code <input type="text" name="source" id="source" value=**"Put selected value of foo here" />** <input type="text" name="destination" id="destination" value="@myVar" /> </div> <input type="submit" value="Send" /> } @form(routes.Application.method()) { <div id="hiddenForm" style="visibility:hidden"> <input type="text" name="commandID" id="commandID" value="18" /> //Undo code <input type="text" name="source" id="source" value=**"Put selected value of foo here" />** <input type="text" name="destination" id="destination" value="@myVar" /> </div> <input type="submit" value="Undo" /> } </td> } </tr> </table>
}
source share