cancel
Showing results for 
Search instead for 
Did you mean: 

BC-BSP-MVC: Passing/Accessing contents of - Hidden Input Fields

Former Member
0 Kudos

Hello Experts-

In the MVC implementation of BSP, can I pass a "Hidden" input field from a view to its controller?

If so, how can I do it?

Please give me an example of this field's declaration in the View. Also, please show me how to access this hidden input field from the form on the View into the Controller (ie., will it be handled via the "DO_HANDLE_DATA" method?).

Thank you,

- Vik.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Vik,

You can easily set visible attribute on HTMLB inputfield control to FALSE.

Dany

former_member181879
Active Contributor
0 Kudos

You don't pass anything from a view to a controller. The view just spits out HTML that goes to the browser. You should just write a snippy little set of HTML code to render out things in the HTML, which when the form is submitted, is returned to the server. Usually this lands in your controller and you can use request->get_form_field to suck those snippy little bits and pieces out again. The simplest way we do it, is with:

<input type="hidden" name="rememberMe" value="<%=myData%>">

If you want the runtime to pick up the form fields for you, and supply them to you again in DO_HANDLE_DATA, then you have to prefix the field names with the controller id. For example: name="myControllerId_rememberMe".

++bcm