Hello,
I am using SurveyJS in a vue application. I am trying to apply my own CSS style on some elements. I am using a method to select those elements and change the CSS classes :
JavaScriptmethods: {
updateClasses() {
const elements = Array.from(document.getElementsByClassName('sv-text'))
elements.forEach(element =>{ element.classList.remove('sv-text')
element.classList.add('login-form__input', 'input-width') })
}
}
This works well but in my survey I have a panel which disappear if one question has a false
answer.
JavaScripttype: 'panel',
name: 'panel1',
enableIf: '{authority}=true',
If the user chooses No
but changes his mind and click yes
, the panel comes back but my classes (login-form__input
and input-width
) are gone and are replaced by the original SurveyJS classes (sv-text
). How can I keep my own classes in this case ??
Hello,
Can you share a minimal working example (in plunker or other sandbox) illustrating the issue?
Thanks, Serge
SurveyJS Team
Here is the sandbox example => https://codesandbox.io/s/compassionate-smoke-csurc?file=/src/mySurvey.js