Create options dynamically with crayons

Hello guys, I’m trying to dynamically assemble the options for a fw-select:


my js:


how could I do to dynamically assemble options that way?

hey @Marllon_Mainardes,

Welcome to the Freshworks developer forum, hope you are safe :slight_smile:

I suppose the issue that you are facing is that the select box doesn’t render in the HTML? if so, could you please try the following approach,

Append the fw-select element with options to parent div instead of appending fw-select-options to the fw-select element like in the example given below.




Hope this helps

Have a Good Day :slight_smile:


thank you very much!


Usually the way you have written will work, if it doesn’t the reason will be that the event fwBlur is not bound to the element, in that cases, you have to bind the event to the element, an example is given below for that approach.

1 Like