cancel
Showing results for 
Search instead for 
Did you mean: 

Adding color to text fields

Former Member
0 Kudos

Hi SAP Gurus,

I have a webdynpro code which interacts with Adobe interactive forms. I wanted to dynamically add a color to one of the text fields on the form.

The webdynpro code I have is as follows:-

node_data->set_attribute( name = `CREATEDBY` value = ls_full_name ).

The above line places the name of the person who created the form on the 'CREATEDBY' text field of the adobe form.

If I now wanted to color this field 'red' on the adobe form dynamically depending on certain condition how can I do this?

Any help in the right direction will earn you reward points.

Many thanks in advance for your invaluable assitance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Imtiaz,

Try the following script at the form:ready event of your created by field in Adobe Form.

if ( this.rawValue == 'X' )

{

this.parent.fillColor = "200, 200, 200";

}

Hope this will solve ur query,

Nawal Kishor Mittal

Former Member
0 Kudos

Hi Nawal,

Thanks for your answer. Does your answer imply that I have to use javascript on the Adobe form and if I wanted to color the field dynamically depending on certain conditions from my webdynpro code how would I go about doing this? eg.

" From ABAP webdynpro code"

If condition then

color the 'createdby' field red on the form

else

color 'createdby' field green on the form

endif

Thanks

Answers (0)