# Multiple choice HTML code

**URL:** <https://forums.realmacsoftware.com/t/multiple-choice-html-code/52266>\
**Category:** Elements API\
**Created:** [November 6, 2025, 1:51pm UTC](https://forums.realmacsoftware.com/t/multiple-choice-html-code/52266 "2025-11-06T13:51:50Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ben](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/ben/32/28488_2.png) [@ben](https://forums.realmacsoftware.com/u/ben)\
**Post date:** [November 6, 2025, 2:43pm UTC](https://forums.realmacsoftware.com/t/multiple-choice-html-code/52266/2 "2025-11-06T14:43:40Z")

</div>

Elements templates don’t support inline conditional expressions like `@if(multiple == 'bbb')`.

Instead, handle your logic in **hooks.js** and pass the processed values back into the template.

Here’s an example:

```auto
const transformHook = (rw) => {
  const { multiple } = rw.props;

  rw.setProps({
    wantsA: multiple === 'aaa',
    wantsB: multiple === 'bbb',
    wantsC: multiple === 'ccc',
  });
};

exports.transformHook = transformHook;

```

Then, in your template, you can use those props directly:

```auto
@if(wantsA)
  A is wanted
@endif

@if(wantsB)
  B is wanted
@endif

@if(wantsC)
  C is wanted
@endif

```

For more details, check the [Hooks.js documentation](https://docs.realmacsoftware.com/elements-docs/elements-language/component/hooks.js/passing-data-to-templates). Let us know if you need more help 🙂

---

_[View the full topic](https://forums.realmacsoftware.com/t/multiple-choice-html-code/52266)._
