Dispaly same attribute on more tabs in the same form

Answered Dispaly same attribute on more tabs in the same form

  • Monday, December 17, 2007 9:47 AM
     
     
    I have an attribute, an I want to display it (him or his contents) on two tabs, on the same form? How is this possible?

All Replies

  • Monday, December 17, 2007 10:03 AM
     
     

     

    mabey not the same attribute , but you can create anothet attribute and on the attribute onchange event , put Jscript code to affect second attribute
  • Monday, December 17, 2007 10:50 AM
     
     Answered

    I've not tried this before but two ideas spring to mind. Both are unsupported.

    1. Attach a new event to each tab so that when they are clicked, you move the position of the original field from one tab to the other.
    2. In a similar fashion, you could use Javascript to inject new "dummy fields" (i.e. they are not proper attributes on the entity) into the page onLoad. These dummy fields would have their value set via Javascript and be kept in sync with your original field to keep it updated within the UI, by using the onChange on your original field. You could even take it further and attach event handlers to make your dummy field update the original field too...

    I use a similar concept to force some guidance text into a "questionnaire-style" entity on one of my forms. I have not implemented the same functionality as you require, but the following code may be a starting point to help you to construct something. It injects some HTML into the "FormTitle" section of my form:

     

    Code Block

      // update the form title 
      var tds = document.getElementsByTagName("td");
      for (var i=0; i<tds.length; i++)
      {
       var td = tds[i];
       if (td.className == "formTitle")
       {
        td.innerHTML += '&nbsp;&nbsp;&nbsp;<font color=yellow>[[-- SOME CUSTOM TEXT HERE BUT COULD EVEN BE AN HTML CONTROL --]]</font>';
       }
      }

     

     

    Smile
  • Tuesday, December 18, 2007 2:28 PM
     
     
    without any workaround like java code, cannot be done?

     

  • Tuesday, December 18, 2007 5:04 PM
     
     

    No - attribute can only be placed on a form once.