For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!
Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.
How to style the background color of text boxes in Oracle Apex version 5.0?
This will depend on what you are attempting to achieve.
Simple way would be to use the theme roller, however this will apply to all.
Hi Aritra
Solution
1) Create a text box called P1_TESTTB
2) Create On-Load Page Dynamic Action. In its True Action, executes the following JavaScript
$('#P1_TESTTB').css('background-color','red'); /*also you could change the CSS styles of other text boxes in your page here*/
$('#P1_TESTTB').css('background-color','red');
/*also you could change the CSS styles of other text boxes in your page here*/
Please check this demo that I have created for you
https://apex.oracle.com/pls/apex/f?p=55160
test/test
I hope that solves your problem
Regards
Mahmoud
Hi Aritra,
If you are using the "Universal Theme - 101" a way to change the background color is editing the page template and adding this text in the css inline section:
.t-Form-fieldContainer .t-Form-inputContainer input.text_field, .t-Form-fieldContainer .t-Form-inputContainer input[type=text]{
background-color: #E464E4;
}
I adding .t-Form-fieldContainer in the declaration of the inputs. These lines only applies to input fields with type = text or has the class .text_field.
Textareas or inputs with other classes and types do not be affected but you can add them adding the appropriate selector:
.t-Form-fieldContainer.t-Form-inputContainer input.text_field, .t-Form-fieldContainer .t-Form-inputContainer input[type=text], .t-Form-fieldContainer .t-Form-inputContainer input[type=number], .t-Form-fieldContainer .t-Form-inputContainer input.my_class{
I hope this answer could help you
Pablo
I am executing the javascript under true action where the selection type is the JavaScript Expression and I am including the statement given above, but its not working.
Its working but as I want to make the background color transparent, it is also removing the border lines of the text container.
please, install the packaged application Sample Dynamic Actions and go to Style=>Add/Remove class (focus) and edit any row. You can see there how to apply/remove style properly.
Regards,
Pavel