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 a comment
10|10000 characters needed characters exceeded

Related questions

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 a 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.