Skip to content

Commit

Permalink
fix restcountries url and correct dynamic panels documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cguardia committed Apr 18, 2023
1 parent d41adbc commit 1b30c4e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,4 @@ Development (unreleased)
------------------------

* Add documentation for dynamic panel references (thanks @rilshok).
* Fix Rest Countries API URL in docs.
11 changes: 7 additions & 4 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,13 @@ example::
"{panel.service} == 'Instagram'"

It is also possible to check the values of dynamic panel elements by referring
to them by indexes. For example, for the following condition, the checking will
be done based on the first element of the dynamic panel::
to them by indexes. However, this requires passing in a ``name`` parameter to
the ``FormPanel`` element. Once that is done, you can refer to a specific
panel number by using the passed in name and an index. For example, for the
following condition, the checking will be done based on the first element of the
dynamic panel named ``social_media``::

"{panel[0].service} == 'Instagram'"
"{social_media[0].service} == 'Instagram'"
Pages
=====
Expand All @@ -276,7 +279,7 @@ and forth between the pages. The final page will show a `complete` button::

class PageTwo(Form):
country = DropdownQuestion(choices_by_url={"value_name": "name",
"url": "https://restcountries.eu/rest/v2/all"})
"url": "https://restcountries.com/v2/all"})
birthdate = TextQuestion(input_type="date")


Expand Down

0 comments on commit 1b30c4e

Please sign in to comment.