Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to clone a FormItem's showIf condition?

    I need to make a copy of a FormItem which has a showIfCondition and I want the new FormItem to have the same showIfCondition. I can't see anything in the API that let's me determine if there is a showIfCondition on a FormItem, much less attach the same condition to the new item.

    The new FormItem needs to be a StaticTextItem regardless of the type of FormItem being copied. I thought there might be a convenient FormItem "clone" method I could use and then change the type to StaticTextItem, but nothing there either.

    Any tips?

    #2
    Rather than attempt a clone of a live item, you probably want to just a factor a method that produces either a StaticTextItem or other type of FormItem according to the parameters it's passed.

    Comment

    Working...
    X