How do I create a pop-up window inside the XLSForm? - webforms

I have a multiple-select question and I need to show a pop-up window to the form user whenever he/she selects one option, in this pop-up window he will answer more questions and close the pop-up to select another item from the multiple-select question or continue the other form questions.
for example, if I have the following multiple-select question:
select one or more items:
item 1
item 2
item 3
if the user selects an item for (example item 1) a pop window will appear to ask the user to answer a single select question about the gender like the following:
select gender:
male
female
after selecting the gender the user could close the pop-up window and if the user selects another item another pop-up window will appear to ask about the gender and so on.
I wonder if there is a workaround to create it in XLSform or not?
Thanks

No this is not possible in XLSForm.
You could automatically create repeats for follow-up questions after answering all multi-select questions (and each repeat could refer to a single multi-select option), but it will get messed if the users goes back to the multi-select afterwards and changes the selected options. I'm not sure if there is a clever way to prevent that.

Related

What are the accessibility considerations for confirmation buttons in modal dialogs?

Consider a modal dialog where a user can select an item from a list.
Option 1: Instantly close the modal upon selecting an item from the list.
Option 2: Have a selected state for the selected item and provide OK / Cancel buttons to confirm the selection before closing the modal.
Which of the two options is preferred from an accessibility standpoint? (considering keyboard navigation support, etc). Note that the selection is non-destructive and the user could easily re-open the modal and change the selection.
Option 2 is your best option here is some guidance related to this and the WCAG guideline
Basically do not change context, update lists etc. automatically on any type of input, you should always give the user a chance to confirm their actions.
Now the question is do you really need a modal if all the user is doing is selecting an item from a list?
Surely it would be a better UX to just have a list you can choose from (this depends on what you are doing, just thought I would point it out as you didn't give an example).
You also need to consider the fact that your modal list should present number of options, currently selected options etc. etc. Yet again these are just guesses and something to consider, it could be irrelevant.

Add record with ID, selecting NAME from another table

Can anyone, please, help me with Libreoffice Base form creation?
I have the following tables:
And I'm trying to add a form to enter new RESOURCES record with the following fields: [RESOURCE_NAME], [CURRENCY_NAME] and [AMOUNT]. But after 10+ tries I have not succeeded. I have tried adding it via wizard, selecting RESOURCES as main form and CURRENCIES as subform and vice versa. I have tried VIEWS and forms based on them. These tries only gave to me or no possibility to enter new record, either creation of the new CURRENCY.
I don't need to create new currency via this form, I only want to enter new Resource (only enter once, not to modify, not to delete). Since I don't want to remember all the ID's I want to select currency name via DropDown list.
Can anyone provide instructions about how to do it, please?
Thanks.
You do not need a subform for this - just create your form document with RESOURCES as the main form (only form).
You will need a listbox to enter the currency item. A listbox has two fields, a display field and a field that is saved in the table. You will set it up to display CURRENCY_NAME and store CURRENCY_ID.
When you create a listbox, the wizard that pops up may get you what you want. If the wizard falls short:
Make sure the form document is open in design mode: on the "Form Controls" toolbar, the leftmost/topmost icon of a pencil with a triangle should be depressed. If this icon is grayed out, close your document, right-click on its name and choose "Edit".
Right-click on the listbox and choose "Control"; this will open the properties window
On the tab "Data" change the "Type of list contents" to "Sql"
In the field "List content" enter SELECT "CURRENCY_NAME", "CURRENCY_ID" FROM "CURRENCIES" ORDER BY "CURRENCY_NAME"
The Bound Field should default to 1. If it isn't 1, change it to 1.
Close the properties window and save your form. It should work as you want now.
If you want a listbox inside a tablegrid: after you create the table, with the form in edit mode, right-click on the column name you want to change and choose "Replace with" and then "listbox".
Edited to include comment by OP about bound field needing to be 1

How to design this page in razor world

In MVC-3/Razor, I need to create a page which will have five set of controls. Each set will have a drop-down and a text box. User will select an option from drop-down and then provide some feedback on text box.
When the view is shown very first time, I only have to enable controls in first set. Whereas all controls in 4 other sets should be disabled. Once user perform action in first set of controls (select optino from drop-down and enter in text box), the second set should become enable now, whereas other set of controls should still be disbaled. The data shown in this second drop-down is dependent upon what user has selected in first drop-down. Once user complete action in this second set, the data in third drop-down will depend upon whatever user selected in first and second drop-down etc.
I am a web-form aspx developer and not sure what will be the best way of designing this in MVC-razor world (because there is not view state etc).
Step 1)
What needs to be clarified is what will cause the other “sets” to be enabled?
Is it after the user has selected an item in the dropdown
OR
Is it after they have entered some text in the textbox?
What also needs to be clarified is if you have a dropdown AND a textbox are they both enabled at the same time or is the textbox only enabled after you’ve selected an item in the dropdown?
Once you’ve got that figured out, move on to the next step.
Step 2)
Do the users need to visually see the 4 sets from the beginning (disabling the 3 other sets) or can you simply show the other sets (on the fly) once the previous one has been successfully filled?
Depending on the answers, this may vary your approach.
As for me, the way I’d do it is simply have/show one set that loads at the beginning.
Once the user has selected an item from the dropdown, I would make an AJAX call passing along the selected item and get back a list of values for the second dropdown.
Then, using jQuery, I would duplicate the row (or div) of the first set all while changing the values in the second dropdown box.
Repeat process for when an item is selected in the second dropdown.
But wait! There’s more!!!
Let’s assume you’ve reached the third set. What if the user decides to change the value in the first dropdown? What are your requirements if that happens? Should you remove all other sets and start back at square one? I guess so…
Since we are not aware of the full set of specs for your tasks, we can only assume stuff and this may (or not) be the best path to take.
Duplicating a row (or a div) using jQuery is quite fun and performance wise, it’s nice.
Keep in mind, you will have to give a different ID to your controls (dropdown + textbox) so when you submit the form, you could use the FormCollection to get those dynamically generated controls.

Flex 4 DropDownList Selected Item

the standard behaviour of a Flex dropdownlist is to disable the currently selected item from the list. Does anybody know how to override this to allow the user to re-select the selected item (if they so desire)?
NOTE: I don't want there to be a selected item in the list but I still want the selecteditem property to be set in the dropdownlist control, otherwise how will I know what has been selected. This is slighly trickier than it sounds...unless I have missed something...
Thanks
Mark
I'm not sure I understand the question but you can listen to close event of the component :
Dispatched when the drop-down list closes for any reason, such when the user: Selects an item in the drop-down list. Clicks outside of the drop-down list. Clicks the anchor button while the drop-down list is displayed.
So, you can access the component and gather the selectedIndex, selectedItem properties.
I guess what I'd like to know is that why you want to "re-select", possible to trigger something again but I'd try close event...

What strategy should I use for multiple room booking selection without JS?

The user requests 2 rooms on the initial page and is then presented with room types to select from on step 2. The arriving and starting dates will always be the same, but the number of adults and children may differ, causing the price to fluctuate.
Now, if JS is enabled I think I'll just program it such that it's tab-powered and when you hit 'Select' which is an input submit, it'll cancel the form submit and mimic a "add to cart" functionality, so the user must select at least one room for each specified.
I'm confused on how I should treat this with JS off - should I just enable radio buttons or checkboxes and have the user select with radio buttons per room? So instead of "Select" button image it would be just a label "Select this" text and a radio button nearby, and at the far bottom of my form there will be one primary submit button.
Ended up just not providing a non-JS alternative.

Resources