locked
Formatting rules for rich text box does not work in browser RRS feed

  • Question

  • Hello, everyone!

    I'm using infopath 2010 for creating forms which should run on sharepoint server 2007.
    I'm making simple formatting rule to disable and hide rich text box contol depending on position of drop-down list.
    It's working just perfect in preview mode, but in browser(IE8 and some other) does not.

    There is no problem with any other controls. I was trying a several solutions, but with no success.

    P.S. Solution like "put this RTB in section and apply rules to section" does not work for me, because it needs to be disabled.

    Thanks in advance!

    Wednesday, March 14, 2012 12:18 PM

Answers

  • I've done this with 2 rich text controls binded to the same field. One is readonly (display tab of the control) another is where you will be entering text. So all what you need is hide the first one and show second one when you need editing and hide second, show first when you need this control disabled.


    http://alecpojidaev.wordpress.com

    Wednesday, March 14, 2012 4:02 PM
  • Hi Vladimir,

    Unfortunately I don't think there is a sound "solution".  HOWEVER, and idea did pop into my head.  It's not the greatest, but it could work.  Create another field - an expression field.  Put this on your form just underneath the Rich Text box control.  Use the workaround of put the Rich Text Box control into a section and hide it when the condition is met.  THEN add conditional formatting on the expression to show when the condition is not met.  This expression box should be set to show the value of the Rich Text Box.

    This way only one of them will appear on the form at a time.  You'll still be able to display the value of the Rich Text Box, but the user won't be able to modify it.

    I hope that helps,

    Melissa

    Wednesday, March 14, 2012 3:20 PM
  • I did have to re-read that a few times, but that's just because it's a control that I'm not familiar with - but I get it now.

    What right now triggers the event when someone approves and it gets the signature (a button, a dropdown, etc.)?  You should be able to call this conditionally - which then you would conditionally call the 2nd box only when it needs to be triggered.

    Friday, March 16, 2012 12:48 PM

All replies

  • Hi Vladimir,

    Unfortunately I don't think there is a sound "solution".  HOWEVER, and idea did pop into my head.  It's not the greatest, but it could work.  Create another field - an expression field.  Put this on your form just underneath the Rich Text box control.  Use the workaround of put the Rich Text Box control into a section and hide it when the condition is met.  THEN add conditional formatting on the expression to show when the condition is not met.  This expression box should be set to show the value of the Rich Text Box.

    This way only one of them will appear on the form at a time.  You'll still be able to display the value of the Rich Text Box, but the user won't be able to modify it.

    I hope that helps,

    Melissa

    Wednesday, March 14, 2012 3:20 PM
  • I've done this with 2 rich text controls binded to the same field. One is readonly (display tab of the control) another is where you will be entering text. So all what you need is hide the first one and show second one when you need editing and hide second, show first when you need this control disabled.


    http://alecpojidaev.wordpress.com

    Wednesday, March 14, 2012 4:02 PM
  • Alec's idea is another good method - you'll need to put both in their own sections to apply your conditional formatting.
    Wednesday, March 14, 2012 4:05 PM
  • First of all, thanks for the answers!
    I'll check your methods. Any way I don't understand why it requires any tricks.. I thought this is some known bug which have fix.

    If you don't mind, I have one more question:
    is it possible to change control name or even delete it with conditional formatting(rules)?

    Thursday, March 15, 2012 4:57 AM
  • Hi Vladimir,

    I apologize, but I don't fully understand your question.  I'm guessing that you want to apply conditional formatting so that when a user makes a certain selection you want to rename a control, or delete the control.  You can't rename the control in the datasource at all when a user is filling out a form - but I'm not sure why you would want to do that anyway?  You also cannot delete a control from the datasource when a user is filling it out - you simply would just "hide" the control from the form view.

    Could you please elaborate a little more on what you're trying to accomplish with your last question - then I can provide you with some more insight.

    Thanks!

    Melissa

    Thursday, March 15, 2012 12:50 PM
  • ok. It's a little complicated. In general it is approval system. Our manager want to see real signature(pictures) on approved form. Please, don't ask why! It's corean thing...
    logic is: some one makes approve, his signature goes to RTB from picture library. this is done with additional feature, which get picture from some AD param and put it to RTB. Order of RTB is predefined. Feature uses box name to set the order. It works just fine. But we need more flexibility. And I thought to make additional RTB and enable it if required. For example: user chooses positions in dropdown lists and this enables a certain RTB. 
    So, all ideas with "hiding" does't work, because hidden box still getting picture.
    I hope now it's clear.)
    Friday, March 16, 2012 8:17 AM
  • I did have to re-read that a few times, but that's just because it's a control that I'm not familiar with - but I get it now.

    What right now triggers the event when someone approves and it gets the signature (a button, a dropdown, etc.)?  You should be able to call this conditionally - which then you would conditionally call the 2nd box only when it needs to be triggered.

    Friday, March 16, 2012 12:48 PM