Welcome and thank you for joining our new OpenText forum. Your questions, responses, best practices, and tips shared with other members will help make this channel vibrant. We're glad you're joining us and look forward to collaborating with you online.

Check out the Getting Started With OpenText Forums for tips on personalizing your experience.

Making readonly TinyMCE fields

The problem I'm running into is that setting one TinyMCE field to ReadOnly seems to set them all. Consider the following DCT:

[HTML]




<script language="Javascript">
function dctInit() {
IWDatacapture.getItem('/a/a1').setReadOnly(true);
}
IWEventRegistry.addFormHandler('onFormInit', dctInit);
</script>



<br />


<br />



[/HTML]

As is, both fields a1 and a2 become readonly. Comment out the setReadOnly line and both become editable. Any thoughts?

Comments

  • Have you tried doing it on some other event rather than on init. If its always readonly then try making that in datacapture.cfg it self rather than FormAPI.
  • Thanks for the suggestion. I gave it a shot but it happens not only onFormInit and setting readonly in the datacap is inadequate because it doesn't render the html..
  • Thanks for the suggestion. I gave it a shot but it happens not only onFormInit and setting readonly in the datacap is inadequate because it doesn't render the html..
    There is supposed to be a newer version of TinyMCE coming with 6.7.2 - I suggest you open a case with Support so that they can (a) try to reproduce the problem with the current version and (b) verify [or get Engineering involved] that the problem doesn't exist in 6.7.2...
  • Yeah, I've opened a support case. They're still investigating.
  • The problem I'm running into is that setting one TinyMCE field to ReadOnly seems to set them all. Consider the following DCT:

    [HTML]




    <script language="Javascript">
    function dctInit() {
    IWDatacapture.getItem('/a/a1').setReadOnly(true);
    }
    IWEventRegistry.addFormHandler('onFormInit', dctInit);
    </script>



    <br />


    <br />



    [/HTML]

    As is, both fields a1 and a2 become readonly. Comment out the setReadOnly line and both become editable. Any thoughts?
    sounds like a bug.
  • The problem I'm running into is that setting one TinyMCE field to ReadOnly seems to set them all. Consider the following DCT:

    [HTML]




    <script language="Javascript">
    function dctInit() {
    IWDatacapture.getItem('/a/a1').setReadOnly(true);
    }
    IWEventRegistry.addFormHandler('onFormInit', dctInit);
    </script>



    <br />


    <br />



    [/HTML]

    As is, both fields a1 and a2 become readonly. Comment out the setReadOnly line and both become editable. Any thoughts?
    looks like a bug in FormAPI. Did you try setting the readonly element in your DCT instead?
Sign In or Register to comment.