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

Validating Fields in JavaScript

New Here ,
Apr 26, 2022 Apr 26, 2022

Copy link to clipboard

Copied

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

Views

467

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

 

 

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

@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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.png

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

I attached form below

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

I have did this but text not exported

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Are you serious?

😉

 

Capture_336.png

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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