Skip to content

How can evaluate Conditional attributes in for loop ? #577

Answered by a-h
rgunindi asked this question in Q&A
Discussion options

You must be logged in to vote

See https://templ.guide/syntax-and-usage/attributes#boolean-attributes in the docs:

<input type="text" id="username" value={account.name} disabled?={ !account.IsAccountActive }>{ text }</button>

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@a-h
Comment options

a-h Mar 3, 2024
Maintainer

Comment options

You must be logged in to vote
1 reply
@a-h
Comment options

a-h Mar 4, 2024
Maintainer

Answer selected by rgunindi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants