Hi @robertrhu
Thanks for the follow up.
Not certain I understand your question. However, the sample code shared illustrates how the field can be used on the template file (frontend).
If the value is not selected, then you append the hide option.
Let me know more on where you are stuck.