Dynamically add controls? - InfoPath Dev
in

InfoPath Dev

Dynamically add controls?

Last post 10-27-2009 07:41 AM by NashParrot. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 09-27-2005 09:13 AM

    • dev
    • Not Ranked
    • Joined on 06-28-2005
    • Posts 4

    Dynamically add controls?

    Hello,
    I have the following task:
    dynamically creating a number of checkbox controls (binded to a repeating element); the number and labels for the checkboxes are stored in a sharepoint list.
    In fact the controls are options describing some entity. It is convenient to store and manage those options in a sharepoint list than redesigning the form each time the option set changes.
    Surely the task could be implemented by using a repeating table with dropdowns binded to the sharepoint datasource.
    But I need the checkbox version since the form view is used for printing also; in this case all the options should be visible, which is impossible for a dropdown.

    Could anyone outline a possible solution?
    Thanks in advance.
  • 09-27-2005 11:20 AM In reply to

    Re: Dynamically add controls?

    Is the issue you are having problems using conditional logic to hide checkboxes? Check this article out on the website -http://www.infopathdev.com/howto/tutorials/default.aspx?i=95f238a046174e749ae2338545e75867
    Jason
    http://www.k2distillery.com/
  • 09-27-2005 11:48 PM In reply to

    • dev
    • Not Ranked
    • Joined on 06-28-2005
    • Posts 4

    Re: Dynamically add controls?

    No, the problem is that the number of controls I need to place on a form is variable, specifically their labels are stored in a sharepoint list.
  • 09-28-2005 04:54 AM In reply to

    Re: Dynamically add controls?

    OK. From what I understand your requirement is that you are storing a list of lables in a sharepoint list. Each label is associated to a checkbox. In InfoPath, there is no sort of label control. I have been very disappointed in that. The closest thing is an Expression box but I have not been able to set it through code.

    Suggest that you a repeating table. The first column will be your labels read from your sharepoint list. I would make the text bound read-only. The second column would be you checkbox control.
    Jason
    http://www.k2distillery.com/
  • 09-28-2005 07:05 AM In reply to

    • dev
    • Not Ranked
    • Joined on 06-28-2005
    • Posts 4

    Re: Dynamically add controls?


    Anyway thanks
  • 09-28-2005 07:14 AM In reply to

    Re: Dynamically add controls?

    Hi,
    Bind Expression box to XML node and modify the text in the xml node using the code. Expression box is the sibling of a label where you can have hardcoded text as label or you have an expression or bind it to a XML node.

    Agni
    InfoPath Dev India
  • 10-27-2009 07:41 AM In reply to

    Re: Dynamically add controls?

    Actually, I was looking through the responses, and maybe I missed something.  I have the same issue.  I have a sharepoint list, that will drive, dynamically,  In my case, I want to dynamically create the sections on a "Optional Section," "Repeating Section", "Repeating Table" or "Master Detail".  Whatever makes the most sense.  If I'm muddying the waters of the original question, I would be glad to post seperately. 

     Thanks!

    NashParrot

Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.