What is JotForm?
JotForm is a freeonline form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.

Why do you not want to answer this thread?(Your answer will be sent to Jeanette and Aytekin)

Unique code to unlock ability to upload

Asked by
ebenokyere
on December 29, 2014 at 11:40 PM

Hi there, compliments of the season :)

Im trying to set up a set of two jotforms that work together.

Form 1:

User uses this form to download a file. in order to make download available they enter their details and recieve a unique tracking code that they must keep (each new instance of a download recieves a new unique tracking code -codes issued should preferably be random and not obviously sequential or following an obvious pattern)

Details from the use of this form are linked to a google spreadsheet. (ie. name etc AND the unique tracking code that was issued on dowload)

Form 2 basically allows the to upload their edited file after completing the prescribed fields.

Ok so for form 1: is there a way to generate unique and completely random tracking codes? ive seen the unique ID plugin which would be perfect except i can only get it to generate sequential codes and once it becomes obvious to the end user that the codes are simple enough to figure out then the point is defeated.

Form 2 is the most complex, id basically like for uploads of the edited file to be limited by a few things:

- the file type must be mp3

- I would like the users to follow a specific naming structure for the filename if possible and not be allowed to upload if they havent. eg: name-surname-downloadedfilename.mp3 (its immaterial how many letters the name or surname field take up, just as long as each is separated with a dash)

- the user must enter their unique id from when they downloaded the original file, the unique id must be checked against the google spreadsheet and upload must only be allowed if it is confirmed that their code corresponds with an ID that we issued.

- (as an added extra, once the unique id is confirmed the details of the remainder of the fileds can be prepopulated from when form 1 was filled to allow dowload of the original file)

I will first give you a short answer, then try to explain what, why and how.

Jotform one would be possible to be created as mentioned above (at least to a certain extent), but jotform 2 would not.

Form 1

Now we have a rand() function that would allow you to have a random value generated each time, but this would not always be a unique number - only the Unique ID widget can produce that, but we can not use it in conditions.

Creating the conditions to check if all of the fields are filled out before showing the download link would allow you to show the link with the random code.

The data collected, together with the download link (with the tracking ID included) would be saved in Google Spreadsheet.

Form 2

The browsers have their own file upload function that each website or web app can use, but it would not be possible to set it to only allow them to select the file with certain structure.

Now, while you should be able to get the name into the conditions currently there is no option of parsing the values in order to check how the file name is constructed, but you can set it to only accept the mp3 files for the upload.

In regards to the entry of tracking code - that would be possible, but it would not be possible to check it against the Google Spreadsheet values.

The best option seems to be to create the jotforms and then get their full source code and hire a developer to help you finish up the parts that are missing.

Do let us know however what you would like to achieve with the tracking code and we might be able to think of something that could work for you.