how to display a dialog box in response to a field

2019-09-14 19:18发布

问题:

I have a situation where I need to display a dialog box when a specific field value is changed by the user in an InfoPath form.

I have a field called STATUS in the InfoPath form. When this field is set to a particular value, a dialog box needs to show up and the user needs to have to enter the value of some other fields (field1, field2 fields3) . So basically the intent is to force the user to enter values in field1, field2 and field3 when he sets the STATUS field to a particular value.

How can I do this in InfoPath 2010 BROWSER form ?

UPDATE: this is an InfoPath list form (based on customizing a SharePoint list), so it seems like there is no way to add code (using the developer tab in InfoPath) to such forms. So is this thing possible using something like JavaScript or something like that?

回答1:

You can't have custom dialog boxes in InfoPath

On of the ways is to be creative to come close to your demand...

You can build something with show en hide sections.

Just put in the fields of you dialog box in a section and the rest of your form in another section. By default hide the "dialog box"-section. Then activivate by rules to show it when needed, while show the "dialog box"-section just hide the rest of the form to force to fill in the dialog section. When done toggle hide/show of the sections.