Forum
Perch Forms App - add 3 letter prefix to the 'responseID'
Hey guys,
Using the Perch Forms App, is it possible to add a 3 letter prefix to just the 'responseID' of each of the 3 forms I'm using?
The responses need to be imported into an Accounting Software package via the CSV download and I have now been asked by the client to add in the 3 letters.
Cheers
see this as it may help...
https://docs.grabaperch.com/templates/form/form/
Look at "perch:form attributes" section for
prefix
Thanks Robert, unfortunately that prefix tag doesn't apply to the 'responseID' in the database, only the new fields you build in your form.
Steve, I want to help here, so additional details are needed... (EDITED: better wording)
When I run the CSV Export the
responseID
is not included in the csv now (with or without prefix) so just using a dummy line from your current CSV, could you please show me what you're expecting. It would be quite simple to build a export app to output your CSV exactly as you wish... just provide a (Now) sample, and a (Required) sample.Thanks, and I will see what we can do...
(EDIT)
my sample output:
Hey Robert, Thanks for getting back to me. Apologies if you thought I was being sharp.
Here is a line from my current CSV output for one of my forms:
What I need to achieve is the 3 letter and dash prefix on the responseID:
On line 40 of 'responses.export.pre.php' in 'perch_forms > modes', I can add in one prefix to the output of the responseID. But now they have 3 separate forms so that wont work anymore.
I'm using Perch 3.0.8 and Forms 1.9.1
Eventually I need to set up a cron job to export the CSV files to an FTP site so that the Accounting Software can pick them up, check them, import them and then delete the CSVs when done.
Thanks
OK, so I didn't hear that....lol ... A Modified App
Steve, I am on Forms 1.9.1 on the server I just tried, so I am going to look into the fact that your CSV includes
responseID
and mine does not...That being said, creating a simple app is the solution here NOT
modifying the existing one
. The custom app could easily query the forms data and create a "List" of forms, then provide a "export" of the responses. There are a couple ways to add the prefix... I would add this prefix via settings in the custom app at export runtime.Otherwise I am out of options in my head... and I am off to find out why the
responseID
is not included in my export...No, Steve... I didn't... and reading back to my reply I can see why you would have thought I felt that way... I didn't re-read my response and now that I have I see it's badly worded and I am going to edit that now. :)
Pretty sure you could achieve this with some js on validation ... something like this
Can't vouch for it but is a rough pass that i'm sure you could improve upon.