InfoPath - Delete specific repeating section - infopath

I have recently been tasked of extending the add/remove functions for repeating sections within an InfoPath form. Primarily because the default look is pretty ugly and unintuitive.
What I want to do is to place a "remove" button within each of the repeating sections, which when clicked will remove that section. This seemingly simple task does not appear to be all that simple in InfoPath.
Does anyone know how I would go about such a thing?

Removing the whole repeating section? or line in that section?
For the whole repeating section, try hiding rule it by putting it inside another section.

There is no out of the box rule that will delete the section.
You could use code for this - write code that deletes the instance of the group when the button is clicked.
You could also leverage Mekalikot's suggestion - add a field called "hide" or something in your repeating group and when the user clicks "Remove" set "hide" to true. Add conditional formatting to hide the repeating section if "hide" = true.

Related

Modifications to QWizard and QWizardPage

I was wondering if there was a way to modify the panel behind the buttons? I need to change the color. Also is there a way to remove the CANCEL button on the finish page?
Removing the cancel button is such a user experience no-no that you should really reconsider it. If you insist on doing potentially the wrong thing:
wizard->setOption(QWizard::NoCancelButton);
You can call it from a reimplementation of QWizardPage::initializePage, that way it will remove the button as the page is being shown.
You can use the style sheets to customize the look of your panel. You can also manually change its pallette.

copying data from Parent Repeating Section to Child Repeating section in infopath

I am having an issue with the repeating section. The scenario is i am having a text box inside a repeating section and a checkbox outside a repeating scetion. I want the value of the textbox to be copied when the repeating section is repeated. This has to be done when i click teh checkbox which is outside the repeating section. I used Xpath formula for this. it works fine if i just repeat the section but not when i click the checkbox which is outside the repeating section.
The formula is as follows
../preceding-sibling::my:RepeatingSection[
count(../preceding-sibling::my:RepeatingSection)
= count(current()/../preceding-sibling::my:RepeatingSection)
- last()
]/my:TextBox
This formula works fine for a single repeating section. But i also have another problem if there are nested sections. for example if i have a repeating section and another repeating section inside it and the textbox inside the nested section. The problem is writing the correct path to navigate within the sections.
Can anyone please help me with this issue
Thanx in advance :)

How to make an entire jqGrid disabled/readonly

How can I make an entire jqGrid disabled/readonly?
I have a page with a logical "edit section" which I show when the user selects something to edit, and hide when the user is done editing (save or cancel). While the edit section is shown, I disable several other elements on the page. I would like to disable their ability to click in the jqGrid, so they can't change selected rows, re-sort, etc. But I cannot find a way to disable/enable the grid as a whole.
Apologies if this has been answered already - other questions seemed to focus on disabling only certain behaviors within the jqGrid.
Edit: Preferably, I'd like an approach that isn't dependent on yet another 3rd-party addon. Nothing wrong with them, of course! But my client has a degree of reluctance with them, so my life would be a little easier with a purely jQuery/jQueryUI/jqGrid solution. :)
You could use blockUI to block the grid.
Try using $("#lui_" + myGridId).show().
The grid has created this overlay internally an uses it as one part of the loader message.
You can just show it or hide it and it will disable/enable the grid for you.

Info Path Form design

how to hide the entire row in a simple (customised)table
In InfoPath you can not conditionally show/hide (or otherwise programatically affect) specific rows/columns/cells in a standard table. Your best bet is to just show/hide the fields themselves that are inside the row.
If you have other text or borders and formatting that you want to hide as well you can get really close by splitting the table up and putting that row in its own section - which can be hidden using conditional formatting.
check out the tutorial at
http://office.microsoft.com/en-us/infopath/HA100338851033.aspx
If you use a control such as a repeating table, you can set up conditional formatting to hide a row that matches a condition.
For hiding you need to use the sections or repeating table. Sections are good as we can put formatting condition on them.
http://www.infopathdev.com/forums/p/774/3005.aspx

Semantic markup to achieve last row editable effect?

I'm looking to have a table that can be added to by just typing into the last row and clicking on the "Add" button at the end of the row. All other rows in the table can be deleted by clicking on a button in their rightmost column.
My problem is that forms can't wrap only one row and validate as XHTML. If I make the form wrap the entire table, it'll include the rows which have a form as their last cell too. And forms within forms are definitely not valid.
Suggestions?
Thanks for clarifying the situation. The way I see it you have a few options here:
Are you using (can you use) JavaScript? If so, you can easily modify the submission URI based on which button was pressed. You can thus get rid of all forms except for table-wrapping one.
Alternatively, depending on your requirements, you may be able to replace your "delete" buttons with links (possibly styled like buttons) in which case you won't need forms to wrap them. Note that this approach does not require javascript UNLESS you need to handle a situation when someone begins to fill last row and then clicks on "delete" on some other row and you want to preserve incomplete changes made to last row inputs. In this case you'd still need to use javascript to submit the form so #1 above would probably be better.
Bite the bullet and submit to the same URI. Distinguish what button was pressed by button name. You can always redirect to appropriate URI at that point.
Make your peace with non-validating html :-)

Resources