31.17 GET_ELEMENT_ATTRIBUTES Function
This function returns some of the standard attributes of an HTML element (for example, id, name, required, placeholder, aria-error-attributes, class) which is used if a HTML input/select/textarea/... tag is generated to get a consistent set of attributes.
Syntax
APEX_PLUGIN_UTIL.GET_ELEMENT_ATTRIBUTES (
    p_item IN apex_plugin.t_page_item,
    p_name IN VARCHAR2 DEFAULT NULL,
    p_default_class IN VARCHAR2 DEFAULT NULL,
    p_add_id IN BOOLEAN DEFAULT TRUE,
    p_add_labelledby IN BOOLEAN DEFAULT TRUE 
    p_aria_describedby_id IN VARCHAR2 DEFAULT NULL ) 
    RETURN VARCHAR2;Parameters
Table 31-22 GET_ELEMENT_ATTRIBUTES Function Parameters
| Parameters | Description | 
|---|---|
| 
                                  
  | 
                              
                                  This is the p_item parameter of your plug-in function.  | 
                           
| 
                                  
  | 
                              
                                  This is the value which has been return by apex_plugin.get_input_name_or_page_item  | 
                           
| 
                                  
  | 
                              
                                  Default CSS class which which should be contained in the result string.  | 
                           
| 
                                  
  | 
                              
                                  If set to TRUE then the id attribute is also contained in the result string.  | 
                           
| 
                                  
  | 
                              
                                  Returns some of the general attributes of an HTML element (for example, the ID, name, required, placeholder, aria-error-attributes, class) which should be used if an HTML input, select, or textarea tag is generated to get a consistent set of attributes.Set to FALSE if you render a HTML input element like input, select, or  textarea which does not require specifying the aria-labelledby attribute because the label's  Note: Inclusion of aria-labelled by is also dependent on the item plug-in having Standard Form Element set to No and that there is a   | 
                           
| 
                                  
  | 
                              
                                  Pass additional IDs here that you would like   | 
                           
Example
This example emits an INPUT tag of type text which uses apex_plugin_util.get_element_attributes to automatically include the most common attributes.
                  
sys.htp.prn (
        '<input type="text" ' ||
        apex_plugin_util.get_element_attributes(p_item, l_name, 'text_field') ||
        'value="'||l_escaped_value||'" '||
        'size="'||p_item.element_width||'" '||
        'maxlength="'||p_item.element_max_length||'" '||
        ' />');Parent topic: APEX_PLUGIN_UTIL