How to hide required field in info path form section. I created the form based on their sections and each section has two required fields. I need to hide each required field when user got submit the item in there section ?
You can add hidden checkbox for each section. Add action rule for submit button (or what you use)
If item was submitted -> make checkbox value true.
And formatting rule for required field
If checkbox value is true -> hide this control
a bit late answer...
Don't use the required option in this case, but make use of rules. Make the submit button based on rules (not submit) handled. Add rules to check your field on that button and at last when all valid: add submit rule of your form.
Related
I have a InfoPath 2013 form in three sections. When one section is submitted I need the previous one to be become read-only/un-editable. I thought the approach might be to use Views as detailed here but I need to be able to submit the sections to a list as well as toggle.
I also though that Conditional Formatting might be the approach but when I righ click on the sectors I don't get the option. Any ideas?
Sections options
You can make section's elements disable.
For example, create checkbox chkOne. If Section2 was submitted, change chkOne's value to true. And add Formatting rule for all Section1's controls "If chkOne is true - disable".
I'm developing a module for openerp v7.
I've defined a workflow and in my view defined a form with a notebook which contain as tabs as status defined in workflow.
In every tab i've a button which triggers the change of status of the workflow. All of this works like a charm!
The problem I am facing is that when the button triggers the workflow status change, the status changes but the tab marked as active is not changed, as far i know this is the expected behaviour, but i would like to change the active tab when the status of workflow changes and i didn't find any way to do it.
INFO: According to the DOCS there is a way of doing this with the fields:
default_focus: set to 1 to put the focus (cursor position) on this field when the form is first opened. There can only be one field within a view having this attribute set to 1 (new as of 5.2)
But no way with pages...
Any help would be very appreciated.
I think that making a tab to be active is not the expected behavior with a workflow. Normally, buttons are putted in the header next to the statusbar, and each button have the "states" attribute to define those status they must appear in (according with the "state" field of the model).
If you want to show/hide some information (say field, group, page, etc) according to the workflow status, you can use the "attrs" parameter with the "invisible" option restricted to a domain over a "state" field value.
If you want to use JavaScript, you can use this to focus a tab page:
$('.oe_notebook #ui-id-3').click()
Where ui-id-3 is the 1 based index of the tab page. Here it would be the third page. Works in v8, can't tell for other versions. Hope it helps anyway :)
I have a form panel having fields like textfield and radio buttons.There are some conditions to hide textfield as per the radio button value.
have added custom validation to textfield.Suppose i have enter a invalid value to a text filed, then i clicked the radio button. as per my condition that invalid text field is now invisible.
Except that invisible field all other fields are valid. Now i want to submit the form data.
Is it possible to ignore the invisible field while submitting the form panel data.?
Thanks
Set the field not only to hidden as also to disabled, that will solve this. Or as mentioned in the comment if you just use a custom validation return true.
I wanted to know if its possible to disallow checking/unchecking of checkbox on clicking checkbox label and only allow checking/uncecking of the box on the box only.
PS: I want to pull it off without using an additional label for the checkbox i.e I wish to disable check/uncheck of checkbox on the checbox label
checking the template (here), can't see clearly how to do that. Additionally it does not have any NamedPart. For me the easiest way is that you suggested... or create your own checkbox.
I have a check box and a text field in my InfoPath form. When the check box is unchecked, I would like to clear the field content and then mark it as read-only.
I created a conditional formatting to mark the form as read-only and then a rule to clear the field content. However, I found that every time I enable both of them, the rule will not run.
To make sure, I created a pop-up dialog box in the rule too and I found every time I enable the conditional formatting to change the text field as read-only the dialog box will not show.
I am suspecting that by changing the text field to read-only suppresses the rule, which clears the text field content. Anyone knows how to fix this?
Yeah this is weird...
If you go back and add a rule to the checkbox to update the value of the textbox when the checkbox value is "True". You will see that the rule on the textbox is now picked up.
I'm not sure why this is the case but I assume that its because the conditional formating stops all rules on the control and by adding a new rule to the checkbox it kick starts the rules on the control.
This is surely a bug with InfoPath, since i've had the same difficulty combining conditional formatting with rules (the conditional change never changes the formatting)
Put the rule onto the control whose value you are changing, so in this case, add the rule to the checkbox, not the field you wish to clear.
You can also add the conditional formatting to the textbox at the same time as this should not affect the outcome of the rule.