Question T433
Visible to All Users

Custom html attributes?

created 7 years ago

Hi there,

I think I already know the answer but is it possible to add custom attributes to a question that will be rendered for the input field for example? I do not see any of this logic in the code of the Vue components https://github.com/surveyjs/surveyjs/blob/master/src/vue/text.vue so this is more a feature request I think

For example I would like to add a max, min, autocomplete=off attributes to the rendering of the input fields.

Answers approved by surveyjs Support

created 2 years ago (modified 2 years ago)

Hello,

You can use the onAfterRenderQuestion, onAfterRenderPage and other onAfterRender~ events to do such customizations. Here is the example: Custom Render of Survey Elements.

Thanks, Serge
SurveyJS Team

Updated

You can use corresponding properties of a Text question to define the min, max, and autocomplete attributes.