Convert a fillable PDF form (containing javascript) to HTML form - javascript

Sorry in advance! I am very new to the subject
I have created a fillable form using adobe acrobat that includes a drop-down that, depending on what is selected, changes some text in a text field later in the document (where I used javascript in the validation field of the dropdown). I want to convert this to an HTML form where this background process for the drop-down & text fields is kept (when using the adobe create web form option, it won't let me keep the background script for the dropdown).
I have tried a few different converters but none have kept the javascript
Is this easily doable for someone with very basic knowledge? Any help is appreciated.

Related

Automatically choose file for website upload based on last submission?

So, I am on a 'competitive coding' website which requires me to manually select a file ("choose file") to submit to the online testing grader. I was wondering, since there are a multitude of extensions on chrome that allow me to auto-fill a form option, is there a way to automatically fill the "choose file" button when submitting a code file based on the last file I chose when clicking that same "choose file" button webpage?
Unfortunately JS can't help here. For security reasons, it is not possible to manually add and upload a file in a file input control with JavaScript.
The reason behind this is that webpages would be able to upload files from someone's computer, so long as they knew the path.
What you could do as a last resort would be using a third party software that would register mouse clicks for you and emulate a real user acting on the interface.
You cannot do that since this input type cannot be prefilled, here is a trick though :
What you can do is having an hiden collection of text inputs containing the base64 of the files you load using your form.
When a user selects a file, just use btoa() and atob() methods to base64-it and store it in this hidden form input
If you want to 'preset' some files, just fill your list of base64 and simply display a kind of placeholder to show that you have a file 'already appended'
Then in your script when form is submitted, work with the list of base64 instead of the actual values from the input type file

PDF Dropdown List that "auto-populates" Fields with values [using PDF X-Change Editor]?

I would like to ask the gurus lurking about on how to create a PDF Table with a Dropdown List that "auto-populates" (I do not know if that is the proper term...) fields with the appropriate values from the Dropdown List. I have already managed to create the table AND the dropdown lists (yay me!). But I would like it to fill up the appropriate columns for the "Rate" and "Hours" columns when I pick from the dropdown menu.
I do not know a single thing about JavaScript but I am aware that is most likely what I need to implement to do what I want to do.
Here is a picture to help visualize what I mean:
PDF Table with Dropdown
I am using PDF-XChange Editor. If we can do the above without having to involve JavaScript, then that would be a plus. If not, I will take what I can get (beggars can't be choosers lol). My many thanks as always!
I figured out the answer to this one. If a PDF has a javascript embedded and created using Adobe, the Javascipt cannot be viewed by any other editor BUT Adobe. So, buy a lisence for Adobe DC Pro and edit the PDF with it.
All of the request above can be done using the Adobe PDF Form editor alongside the Javascript tool inside it.

Filling forms in Salesforce Lightning using console commands in Chrome

I am trying to automate the filling of a form on Salesforce with the Lightning interface and am hoping this can be done by simply entering a series of commands in the browser dev console or similar (I'm not averse to running a JScript or Python script or other if that would be easier).
Basically the form is a series of what appear to be Java fields (text, combo boxes, check boxes, etc.) and when I inspect the various elements I would like to fill in I can see their various identifiers as shown below without any issue.
Most of the fields have a huge list of event triggers associated with them, such as those below for the above text field.
So is there some what I can use the console (or JS or Python) to quickly and easily set the text to this field in the same way one might select the field and then type in the text?
Thank you!

How do you extract variables from javascript for html web form

Okay I have seen script which I got from this site Adding input elements dynamically to form
I have made some slight changes to it. The objective of the script is to ask a user for an input and then supply them with number of fields. Assume the person puts in 3. I would then want to capture those three inputs as a list and export them to python. I am currently using cgi-bin and python. Those are parameters I have to work with.
How can I pull the elements from the web form using that script
Once I activate the addfileds function. I am unable to see fields in the form below it. I would like to have more than one dynamic fields.

How can I create a Form in Web Page with giving User Option to add multiple fields and then Download PDF?

I looked through various answers for this but still cannot find a proper working solution. Here's what I am trying to accomplish:
User can add input fields, such as Page Title, Text inside Page. While everything is optional, More fields can be added, or removed. All depending option User.
Add Images, using Input Field. Again, User can click Add More Images and hence, using Onclick button, A new input field appears which can take input of Image.
After done adding the required content, User Can Download PDF.
Any Suggestions are welcome. I have spent way too much time with several PHP and JS Libraries but everything is Static, Can't generate Input Fields according to Users.

Categories