Link custom button with text field and date
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
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.
Copy link to clipboard
Copied
Finalllyyyyy... Thank you so muchhhh!!

