40.4 GET_INPUT_NAME_FOR_PAGE_ITEM Function
Use this function when you want to render an HTML input element in the rendering function of an item type plug-in. For the HTML input element, for example, <input type="text" id="P1_TEST" name="xxx">
, you have to provide a value for the name
attribute so that Oracle APEX can map the submitted value to the actual page item in session state. This function returns the mapping name
for your page item. If the HTML input element has multiple values, such as a select list with multiple="multiple"
, then set p_is_multi_value
to TRUE
.
Note:
This function is only useful when called in the rendering function of an item type plug-in.Syntax
APEX_PLUGIN.GET_INPUT_NAME_FOR_PAGE_ITEM (
p_is_multi_value IN BOOLEAN )
RETURN VARCHAR2;
Parameters
Table 40-1 GET_INPUT_NAME_FOR_PAGE_ITEM Parameters
Parameter | Description |
---|---|
p_is_multi_value
|
Set to TRUE if the HTML input element has multiple values. If not, set to FALSE . HTML input elements with multiple values can be checkboxes and multi select lists.
|
Example
The following example outputs the necessary HTML code to render a text field where the value gets stored in session state when the page is submitted.
sys.htp.prn (
'<input type="text" id="'||p_item.name||'" '||
'name="'||apex_plugin.get_input_name_for_page_item(false)||'" '||
'value="'||sys.htf.escape_sc(p_value)||'" '||
'size="'||p_item.element_width||'" '||
'maxlength="'||p_item.element_max_length||'" '||
coalesce(p_item.element_attributes, 'class="text_field"')||' />' );
Parent topic: APEX_PLUGIN