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

Link custom button with text field and date

Community Beginner ,
Nov 15, 2022 Nov 15, 2022

Copy link to clipboard

Copied

Hi guys.

So I've been searching for this answer but couldn't found anything relevant.

This is a patient form and I need to record the date of their appointments in a single form.

I have 3 fields.
1. Date field: Date1
2. Button (Add): Add
3. Text field (read only): Text1

Now what I want is whenever I select a date and click on add button, the date must appear on that text field. And this process will continue whenever I will have the appointment with the same patient.
So at last there will be a list of dates on that text filed.

I am totally unknown with js. Kindly help me with this

TOPICS
JavaScript

Views

631

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 ,
Nov 15, 2022 Nov 15, 2022

Copy link to clipboard

Copied

As the Mouse Up event of "Add" enter the following code:

 

var s = this.getField("Date1").valueAsString;

if (s!="") this.getField("Text1").value+=s+"\n";

 

Of course, the "Text1" field must be set as Multiline.

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 ,
Nov 15, 2022 Nov 15, 2022

Copy link to clipboard

Copied

LATEST

Finalllyyyyy... Thank you so muchhhh!!

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