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

Validating Fields in JavaScript

New Here ,
Apr 26, 2022 Apr 26, 2022

Hi,

We are trying to hide the text while entering into the text field and show the text after submitting the form. We need to know where we need to add this code

we used the below code

var a=this.getField("cityname") ;
var aValue="";
this.getField("cityname").onkeyup = function() {aaa()};

function aaa()
{
var inputvalue=a.value.substring(a.value.length-1);
if(a.value.length<=15)
aValue+="*";
else
aValue+=inputvalue;
a.value=aValue;
}

TOPICS
Create PDFs , PDF forms
729
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 26, 2022 Apr 26, 2022

This script will overwrite any input made in the "cityname" field, instead of hiding it.

 

This is not part of the ECMAScript language:

this.getField("cityname").onkeyup

 

 


Acrobate du PDF, InDesigner et Photoshopographe
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 26, 2022 Apr 26, 2022

@JR Boulay We want to hide it while entering the text after submit we want to see the text. Can you help us with the coding

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 26, 2022 Apr 26, 2022

I guess you should use a text field with the "password" option enabled, but...
For obvious security reasons the value of such a field is not exported or saved with the other data.

So before sending the form the script should remove the "password" option from the field concerned, or duplicate its value in another (hidden) field.

Can you share your document or a rougth?

 

Capture_330.pngexpand image


Acrobate du PDF, InDesigner et Photoshopographe
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 27, 2022 Apr 27, 2022

I attached form below

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 27, 2022 Apr 27, 2022

I have did this but text not exported

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 27, 2022 Apr 27, 2022

Are you serious?

😉

 

Capture_336.pngexpand image


Acrobate du PDF, InDesigner et Photoshopographe
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 27, 2022 Apr 27, 2022
LATEST

No Issue sir,
Password :  Rise@123

I can make up the hours over the rest of the week, if that would help. Please let me know at your earliest convenience.


Thank you,

Manikanta

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