Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
2

read only after input in text field.

Community Beginner ,
Apr 12, 2024 Apr 12, 2024

I have text fields set to input the time when it is clicked.

Is there a way to make the text field read only after the time is in.

 

event.value = util.printd('hh:MM', new Date());

 

current code to insert time when text field is clicked

 

Thanks

R

TOPICS
Create PDFs , Edit and convert PDFs , How to , JavaScript , Modern Acrobat , PDF , PDF forms , Standards and accessibility
213
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 12, 2024 Apr 12, 2024

sorry this is the code

event.target.value = util.printd('hh:MM', new Date());

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 12, 2024 Apr 12, 2024
LATEST

Add this to the end of the code:

event.target.readonly = true;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines