cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a help button beside a field and provide help text.

mm00396
Explorer
0 Kudos

Hi Guys ,

I have a requirement where I need to provide a small help button beside a field on web UI .On pressing this button the users will be provided with the data what to enter in the field.This data must come as a pop up .The user will read the text from pop up and close.Accordingly , he will then fill the field himself.

Here the required field is a long textarea field (like the notes field in Account details page).And how to provide the help text in pop up.

One more question :Is there any other way to help user enter this text field..?The user only wants some help to fill out the fields.He will not select any value.

Enter questions?

                                                    

This is how the field will look.I want to give a help button left side of this field and then the help texts should come on click.

Awaiting response.

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member210661
Active Contributor
0 Kudos

Hi Pranav,

i think we can do using script also go through this procedure might be this will give you some idea.. declare button and notes in your view.html when ever user click on that button display alert which is like popup that will show the what ever written value in that notes field..

ex :

view.htm code...

<script type="text/javascript">

function Select() {

   var Field = document.getElementById(thtmlbKeyboardFocusIdFieldId);

   var fromId      = Field.value;

   var value11 = document.getElementById(fromId).value;

   if (fromId.indexOf("fromTextArea") == -1) {

     alert("Please Enter Some Text In notes");

     return;

   }

     alert(value11);

   }

</script>

<table>

   <tbody>

     <tr>

       <td>

<input type="button" value="click" onclick="Select();" />

</td><td>

<thtmlb:textArea id   = "fromTextArea"

                  text = " " />

        </td>

     </tr>

   </tbody>

</table>

Try this and let me know..

Thanks & Regards,

Srinivas.

ashik_k2
Contributor
0 Kudos

Hello Pranav,

You can go for tool tip option available in CRM UI framework.

Thanks and Regards,

Ashik

deepika_chandrasekar
Active Contributor
0 Kudos

HI,

You can create a attribute in context node by creating GET_HELP method and add it next to your field. in GET_P method you can define which event should get triiger and type as image.

GET method

value = '/sap/public/bc/icons/s_B_ARRI.gif'.  "pass your icon path here

GET_P method

  CASE iv_property.

    WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.

        rv_value = cl_bsp_dlc_view_descriptor=>field_type_image.

      WHEN if_bsp_wd_model_setter_getter=>FP_ONCLICK.

      rv_value = 'HELP'.

  ENDCASE.

And create a event handler for help EH_ONHELP and put code for popup.

Regards,

Deepika.

Former Member
0 Kudos

Hello,

I think action menu is an ideal solution for this.

But I've done something similar recently, but aint sure if this is exactly what you intend on achieving as you need to add an additional context attribute!!

For this, you define an additional context attribute, say NEW_FIELD, and  modify IF_BSP_MODEL~INIT on the context implementation class to add the new field to struct ref. Also, add GET_ and SET_ methods for the new element. Now in the get_p for the field, make field type as image, and trigger an event on click to 'EV_NEW_FIELD'. In the GET_NEW_FIELD method, comment out the entire code and add something like below to specify the image source

cl_bsp_mimes=>sap_icon( id = 's_f_help.gif'

Change the configuration of the corresponding view to add the new field, next to the field you intend on having help on. now, on the event handler method for the field (EH_ONEV_NEW_FIELD!!), you can either use standard component gsurlpopup by passing value for url into the context node, or just use javascript to open the url.

Thanks

Former Member
0 Kudos

Hello,

I would do it with an action menu. There is documentation around for this topic.

Best regards,

Thomas Wagner