# Creating optional questions

**URL:** https://discourse.openehr.org/t/creating-optional-questions/2523
**Category:** New to openEHR?
**Created:** [20 April 2022 08:29 UTC](https://discourse.openehr.org/t/creating-optional-questions/2523 "2022-04-20T08:29:17Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![pablo](https://discourse.openehr.org/user_avatar/discourse.openehr.org/pablo/32/3505_2.png) [@pablo](https://discourse.openehr.org/u/pablo)
#### Post date: [20 April 2022 16:05 UTC](https://discourse.openehr.org/t/creating-optional-questions/2523/7 "2022-04-20T16:05:00Z")

</div>

> [@MacL3an](#):
>
> . I realise the rendering must be done at the user interface level, but is there no way to model this logic in OpenEHR? How should the UI code know what answer alternatives should toggle which question? If we want to build a UI layer that can render any template we send, this logic has to come from the template. Otherwise we have to code information about each template into the UI layer?

Hi @MacL3an we had several discussions about this topic in the past, e.g. [Agreeing on optional user interface hints in templates - #3 by pablo](https://discourse.openehr.org/t/agreeing-on-optional-user-interface-hints-in-templates/2406/3)

My opinion is to create a GUI spec on top of templates, which includes rules like the ones you mention. In many cases I don’t think the place for those rules is the template. This spec we’ve been working on covers the layout, rendering and binding of GUI elements with openEHR model elements, it doesn’t include the rules model yet [https://discourse.openehr.org/uploads/short-url/5635h3NBrDHbY830w93jctgPsBM.pdf](https://discourse.openehr.org/uploads/short-url/5635h3NBrDHbY830w93jctgPsBM.pdf)

I hope requirements like yours could speed up the elaboration of such models and the approval from openEHR.

---

_[View the full topic](https://discourse.openehr.org/t/creating-optional-questions/2523)._
