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

Adding a seq. number generator field to a text field that then becomes the subject line of an email

Explorer ,
May 10, 2021 May 10, 2021

Copy link to clipboard

Copied

Hi... I have created a sequential field using help sourced from this forum a few years ago... (called 'SEQ1') using the following code;

 

var num = this.getField("SEQ1");

num.value = Number(num.value)+1;

num.defaultValue = num.value;

 

I am using 'submit a form' to mail the PDF complete to 3 email addresses (I can get that to work).

 

I have 3 issues however (that are interlinked);

 

1) I would like for this sequential number to be prefixed by the letter 'L' and 4 zeros (i.e. L00001, L00002 etc)

2) I would like the content of this field to be added to the subject line of the submitted email (i.e. currently the subject of the line is 'Emailing {filename.pdf}' and I would like it to read 'Emailing L00001 {filename.pdf})

3) This is being used as an ordering sheet for use on an iPad... as such I have used a 'reset form' command (and excluded the 'SEQ1' field so that this isn't inadvertently set back) to clear the contents of the fields throughout the form, but as it is an iPad form, the user completes the following steps;

a) opens the form

b) reserts the form (to avoid ordering of items previously listed) - this works

c) selects quantities for items (by means of drop down quantities) - this works

d) submits the form by email by clicking a button-field - this works (but ideally would cater for 1&2 above)

e) IMPORTANT - exits the form by clicking the arrow at the top left of the screen on the ipad [as far as I can tell, this 'minimises' the form as opposed to 'saves' it... so the sequential numbering doesn't work].

 

Sorry there is a lot here, but as you can see they are all intertwined 

 

Many thanks if you can help - I'm not a coder 😕 my guess is that the 'submit form' needs to be a JavaScript code but at that point the birds start chirping!

 

Simon

TOPICS
Edit and convert PDFs , PDF forms

Views

678

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 ,
May 10, 2021 May 10, 2021

Copy link to clipboard

Copied

This is not possible on an iPad. You can do it on a regular PC using a script, though.

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
Explorer ,
May 10, 2021 May 10, 2021

Copy link to clipboard

Copied

LATEST

Shame... 

 

But thanks 🙂

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