Updates for the website www.soapnote.org. The site uses forms. I have limited internet access and can chat/answer questions only 1-2 times per day. If this goes well, there may be future projects.
This is a wordpress site. The changes to the website are in the 'soapnote' theme and the plugins.
1. [shorthand] shortcode
Feature that could be added to the beginning of a form:
It would have text snippets that would set short strings equal to larger strings.
When the calculate button is clicked, it would expand all of the short strings.
It would be [shorthand name=“********” value=“sample text”]
This shortcode would have two parameters - name and value.
The code for this should be put in themes>soapnote>lib>[login to view URL]
2. [frontload] shortcode
[frontload soapnote="***"]. Frontload would pull another page from the soapnote site to load before the existing page. It would not load anything that comes after the form inputs. It would not load 'calculate result', 'reset form', the result box, 'copy to clipboard', etc. It would just bring form pieces from another form to load into the existing page. In the part above - soapnote="***", *** would be the slug for the form to load first.
Proofread from the generator page: [login to view URL] It would go through the text line by line. If it goes all the way through to the end, it would say “Success!” If it does not, it would give the line number where it hangs up.
The page [login to view URL] is a place to test and build forms. Users make forms but if they don't work, it is difficult to debug them. When there is an error it is hard to figure out where it is. The user clicks on 'Run' and then nothing shows up on the right side of the screen. I would like to add a way to find where the error is occurring.
4. Work with CSV files
In the past, the site had the option to save form output on the site. This is not what I want. Instead, I would prefer users have the option to save form output to their computer as CSV files. It may be helpful to review the previous functions I used for saving form output at themes>soapnote>[login to view URL] and themes>soapnote>submissions.php.
4a. I would like a "Fill from CSV" button next to the "Reset Form" button. This would fill a form with "variable_1", "variable_2", etc. It would get "variable_1", "variable_2", etc. from a CSV file.
4b. I would like a "Save to CSV" button next to the "Add to Scratchpad" button. This save a CSV file with the items currently in the form.
(Request #4a and #4b could be used for a person to save their work and come back to it without having to save any of the form data on the website)
4c. I would like a "Email the Output" button updated. It would be changed to "Email Form Data". It would send a CSV file of output using the ‘variable_1’, ‘variable_2’, as columns of the CSV. The text of the email would say:
Below is the form output from the web page [insert specific page's web address here]. A CSV file containing form inputs is attached to this email. CSV files may be opened and read by spreadsheet programs on most computers. If the columns of the CSV file are named "variable_1", "variable_2", etc., then you may load the inputs back into the form at [insert specific page's web address here]. For any questions regarding this feature, please visit [login to view URL]
The form output is below the line.
[it would insert the form output text here]
The last column of the CSV file is the form output" is would send an email with text in the body of the email. It would attach a csv file to the email.