How to add fading text in a form field (to show a suggestion)
답변함
2022년 11월 18일에 게시됨
Dear Zendesk community!
Here :
Shows how to prepopulate a field with text.
Does some body now how to put text that fades when the user click on the field?
(like a suggestion) Here is an example (on the right side of the code) : https://developer.mozilla.org/en-US/docs/Web/CSS/::placeholder
Many thanks
0
5
댓글 5개
Ifra Saqlain
Great ! :)
0
Raphaël Péguet - Officers.fr
Thank you very much Ifra Saqlain it works perfectly!!
Best regards,
Raphaël
0
Ifra Saqlain
@Raphaël Péguet, try this updated code and remove previous:
Team
1
Raphaël Péguet - Officers.fr
Ifra Saqlain Thank you very much Ifra!
It works but because of "onclick" function if I write over the "native" text
Then go to another field and come back to the previous field to rewrite "the on click function" will erase what I wrote.
I did a video about it: https://www.loom.com/share/5e5d95df2e2a499787a756d44298126a
So maybe we should ask a "if" to the "onclick" to say if val = native value then fade if not don't do anything.
Best regards,
Raphaël
0
Ifra Saqlain
Hey Raphaël Péguet,
Can be done something like this:
Team
0
댓글을 남기려면 로그인하세요.