Not sure what you mean by “link a new page” but yes, you could set some global variables, open a page, let that page change those global variables, then open the first page. Would be easier (and better usability) to stay on the same page and show a modal dialog, or even a “fake page” as a dynamic panel. Axure doesn’t let users dynamically create pages in a prototype. Of course you can do this in the RP editor. You can fake new pages with dynamic panels and/or inline frames, or you can use an existing page as a “new (to the user) page”.
You can’t dynamically edit a Droplist widget–i.e., let a user add/remove/change the contents of a Droplist. If it is a “pre-canned” edit–you know the exact item to be added and page to link–you could do this by creating a second Droplist widget in a dynamic panel state. So the first state would have your initial Droplist, second state the “new” Droplist. Usually, this fakery works fine for demos, specs, and even most usability tests–it’s enough to get across the concept.
Here is a similar approach in an Axure Tutorial:
If that’s not enough and you really need a user to freely enter in any text as a new category, this really begs for a Repeater, but you can do this in a limited fashion with basic widgets. So, instead of a Droplist widget, you’d manually build your list with rectangle widgets in a group or dynamic panel, and show/hide it as needed. (Sounds like that’s what you’ve already done.) Create one or more empty list items–however many you need (that’s the “limited” part)–so maybe one is enough, maybe you need up to 10–and hide them by default. When user creates a new item (you’ll need a text field to capture their input) use Set Text with the text field’s text value as the source and the hidden widget as a target, then show that widget. If you have more than one you can use a global variable to track which widget to set text and show. E.g.,
If NewCategoryCount equals “1”
Set Global Variable NewCategoryCount to [[NewCategoryCount + 1]]
Set Text new_category_item to text on widget CategoryInputField
Show new_category_item
You cannot directly change interactions for a Droplist item, nor any widgets. You can pre-build all the possible interactions and use conditional case logic to fire the appropriate action. E.g.,
if selected option of MyDroplist equals Parking
Set Text MySurveyCategory to “Parking Category”
Else if selected option of MyDroplist does not equal “Create another category”
Set Text MySurveyCategory to selected option of MyDroplist
…or…
If length of widget value MyInputField equals “0”
Show ModalDialogPanelA bring to front
Else if OnLoadVariable contains “error”
Show ModalDialogPanelB bring to front
Else if MyInputField contains “Access”
Show AccessibiltyColumn
Else if MyInputField contains “Create another”
Open “Page 2” in Current Window
etc. …
So far you don’t need anything that fancy in a repeater, so this is a good chance to try them out. Here is Axure’s documentation on Repeaters, with a primer video. There are also some of their tutorials that use repeaters: https://docs.axure.com/axure-rp/reference/repeaters/
I made a little demo of how this could be implemented using Repeaters.
Custom List and Table.rp (105.7 KB)
-
There is a Repeater widget, named “Q Cat List” for the Question Category list that allows user to:
- Select an item
- Create a new item
- Remove a custom-created item
- I chose to create a dynamic panel within the repeater cell (and this same approach can be used outside a repeater as well) with one state for each of these 3 functions.
- Clicking on a category item selects it and sets a global variable, named “VarQCat” to its text, which the Submit button uses to assign to the Survey table.
- Clicking on the “Create…” item sets the dynamic panel to a state named “New Input” which contains a text field. When user presses the Enter key (and field is non-empty) it adds a new row to this repeater list.
- When a new item is created it is flagged as “custom” and gets a little ‘x’ icon. Clicking this icon shows a choice to delete or keep–and this is the third dynamic panel state.
- So, this list now has some useful features (or if you not useful for your purposes, easily removed or not invoked) which only needed to be created and handled once–in the repeater cell–rather than 6 or more instances–so demonstrates how repeaters can be quicker to set up and typically much easier to maintain. A user can add as many new items to the list as they want, so your prototype acts more like a real application.
-
I “wrapped” this repeater in a dynamic panel so that when it gets resized it can easily move the Survey Table below it to maintain consistent padding. See the Resized event of “Q Cat Panel”. (Likewise, I wrapped the Survey label, title row and Survey Table repeater in a dynamic panel named “Survey Panel”)
-
Another Repeater widget, named “Survey Table” has a column for each column in the “builder table”
- In the RP editor, you’ll see one row (with the default text labels I set up) but in the browser it does not appear because there are no rows set in its datasheet.
- If you wanted to show blank rows, just add rows with no content to the datasheet (select the repeater and look in the STYLE pane.)
-
The Submit button takes the chosen items and entered text from the builder table and adds a row to the Survey Table repeater with these values. Then it resets the builder table widgets to their defaults.
- Two global variables help track things:
- VarQCat stores the chosen item from the “Q Cat List” repeater
- VarAType stores the chosen radio button from Answer Type (just making up this stuff since it was blank in your screenshot)
- Everything else can be directly determined from the widgets in the builder table.
- Take a look at the Add Rows action of the Submit button’s Click or Tap event.
- Click the “add 1 row” line
- Click the “Add Rows” button (just to see what it contains)
- (The dialog can be widened to see all the columns, and each column can be widened)
- Each cell in the row (to be added) contains an expression defining the value to add for the given column.
- Click the little fx icon in a cell to open the Edit Value dialog. This is the best way to look at the full expressions used. An “expression” in Axure is a way to represent the results of math, functions, variables, string manipulations, etc., and are always wrapped in double-square brackets. For example, [[1+2]] results in the value, “3”; [[OnLoadVariable]] results in the value of the global variable named “OnLoadVariable”; [[OnLoadVariable.substring(0, 3)]] results in the first three characters of that value.
- In the Edit Value dialog, if you click on the “Insert Variable or Function” link you get a categorized list of all the global variables, repeater elements, math and string functions, etc. This is a great way to learn how these expressions are used, what’s possible, and especially for repeaters, an easy and reliable way to refer to their contents.