Monday, March 12, 2012

Css class of label and element on a form page

It doesnt seem possible to change the actual HTML above the <label> element of a label in a form page in APEX. And because of that I have created a little script which will update directly in the apex tables. This script should be used with caution since it is not safe to change the data in these tables manually.

What the script does, corresponds to going through all items manually making sure the attributes: "HTML Table Cell Attributes" of the label and "HTML Table Cell Attributes" of the element are set. The script will add the text : "class="html_table_cell_attr_label"" ,and the text: "class="html_table_cell_attr_element"" to all fields where it is missing. It will NOT replace the text in the field. 

update apex_040100.wwv_flow_step_items set
  cattributes = cattributes || ' class="html_table_cell_attr_label"'
where flow_id = 100
and cattributes not like '% class="html_table_cell_attr_label"%'
;

update apex_040100.wwv_flow_step_items set
  cattributes_element = cattributes_element || ' class="html_table_cell_attr_element"'
where flow_id = 100
and cattributes_element not like '% class="html_table_cell_attr_element"%'
;

No comments:

Post a Comment