Skip to Content
author's profile photo Former Member
Former Member

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

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.

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • Posted on Jun 05, 2004 at 08:09 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 07, 2004 at 02:35 PM

    Hi Vik,

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

    Dany 😊

    Add comment
    10|10000 characters needed characters exceeded