facebook app keeps the input field form values when going back - html

I am building a facebook app ....
Lets say you fill up the form after clicking like button. You get a thank you page. Now go back using browser back button. Most of the input data values still remains. That is a problem. How to make sure that when user goes back the values not there?
http://on.fb.me/1iyj6ZQ

Related

VBA webcontrol automation problem with inputfield

I'm an accountant and I develop a lot of automation to carry the repetitive task of my job. I've been fairly successful with most of them, but I got stuck with some code I can't find the solution to and probably it's just a simple thing I should already know.
So it's like this, I used to use selenium and make the code open an IE instance and navigate, login, fill multiple fields, select radio buttons etc. But I was using this with sendkeys function and Tab.
Now I reviewed all the code and implemented a webbrowser element to a userform and I'm using HTMLdoc to interact with the webpage, the objective of the app is to open the website, fill the invoice information then send and save the file, right now I'm able to login and navigate to the new invoice page.
The problem starts here, I use this code to get the text to the input fields on the webpage:
HTMLDoc.getElementsByName("dataInicio").Item(0).Value = Controlo_Arrendamento.txt_dataInicio
HTMLDoc.getElementsByName("dataFim").Item(0).Value = Controlo_Arrendamento.txt_dataFim
HTMLDoc.getElementsByName("dataRecebimento").Item(0).Value = Controlo_Arrendamento.txt_novoData.Text
HTMLDoc.getElementsByName("valor").Item(0).Value = Controlo_Arrendamento.txt_novoPago.Text & ",00"
HTMLDoc.getElementsByClassName("btn btn-sm btn-success").Item(0).Click
What happends is, when the submit button was pressed, the website gives me an error in every field, then I realized that when the data is inputed on the website normaly it automaticaly updates other elements on the webpage, it goes through some validation, so when my code inserts the values on the textbox it doesn't trigger, only by typing the values in...
So, I tried to dig everywhere for a solution, I watched the HTML elements and what changes when the value is valid and it's checked, tried implementing a .checked = true but no solution.
Anyone knows what I can do to get trough this?
I could send you the webpage but it needs a login and since it's a nacional finances website I'm afraid I can't share with you any login, but I will leave here the website in question, it may help figuring out what type of form i'm interacting with.
https://www.portaldasfinancas.gov.pt
Thanks in advance

Display Contents After Correct User Input

I'm a beginner in web dev but I'm really good on the software end. I have some HTML to display text and a YoutTube Video on a webpage. But before this, the user must be prompted to input a value in a text box.
What I wanted is for the user to see a box with a submit button. The box will only accept one of 7000 unique entries. Once the user inputs one of the 7000 entires, only then the HTML/YouTube Video must be displayed. Otherwise the page can display a message saying: Retry, entry not recognized.
The webpage is running Wordpress with Motopress. Is there anyway I can do this with Custom fields to store the values or whichever way is easy and quick?

Disable submit button in Google Forms?

I'm writing a form and have a multi-select with certain responses (age range); for ranges below a specified value, we redirect users to a page with information on why we don't accept that range currently, etc.
The problem is that the form navigation appears on this page, so they can hit Back (no problem) and Submit (problem).
We don't want users submitting if they wind up on this error-catch page, but I haven't seen any way of disabling or hiding the submit button.
Even checking Google scripts, it doesn't seem like this is possible? Does anyone know if there's a way to do this?
The SUBMIT button either appears on the last page, or on pages where the setting is set to: Submit Form
You probably have the error page as the last page, and the next to last page set to Submit Form.
There is no way to disable the submit button. Put the error page BEFORE the last page. Make the page that is right before the error page skip over the error page and navigate to the last page (Submit Page). On the last page have only one question like: Are you done? "Yes" "No" This way, the user will never see the submit button until they get to that last page. On the Error page, set the page navigation to go to something like back to the first page. If the user clicks BACK on the SUBMIT page, it will skip over the error page and go to the page before it. Of course, the user could navigate back, and change the answer, and get to the SUBMIT page. But then they'd be lying about their age.
You can disable the Google form by accessing Responses tab and unchecking the option Acception responses.
you can use this restrict Data in Google Sheets with Data Validationso it will show a pop up message based on DATA
https://www.howtogeek.com/428919/how-to-restrict-data-input-in-google-sheets-with-data-validation/

processing html form partway through

Previously, I have seen web forms that are multiple pages long, but on each page, if the inputted information is invalid, it will cause an error and make the user fix their input.
However, I can't seem to find anything to show me how to do this. My form is 2 pages, with a Continue button at the bottom of the first and a Submit button at the bottom of the second. However, all possible errors generated will be on the first page, so I want it to show them if the user hits Continue when he has inputted errors.
Right now, the form is only processed after the user hits Submit and all the data is posted to the backend, which means it then has to go back to the first page to show the errors.
You could try to check the information every time the user continues to the next input control, and tell him that there's something wrong if he enters any nonsense.
How to achieve this depends on how your form looks:
Does it just contain and something like that or radio buttons and other "special elements"?
For you could check at the FocusLost event, but I don't exactly remember its syntax.

Best way to do a 'Confirm' page?

I was wondering about the best way to implement a "Confirm Page" upon form submission. I know that it's best for the script that a form POSTs to be implemented by handling the POST data and then redirecting to another page, so the user isn't directly viewing the page that was POSTed to.
My question is about the best way to implement a "Confirm before data save" page. Do I
Have my form POST to a script, which marshals the data, puts in a GET, and redirects to the confirm page, which unmarshals and displays the data in another form, where the user can then either confirm (which causes another POST to a script that actually saves the data) or deny (which causes the user to be redirected back to the original form, with their input added)?
Have my form POST directly to the confirm page, which is displayed to the user and then, like #1, gives the user the option to confirm or deny?
Have my form GET the confirm page, which then does the expected behavior?
I feel like there is a common-sense answer to this question that I am just not getting.
If you must do this (I'd only do it for stuff involving monetary transactions or the like, personally), I'd recommend 2 resources/URIs, both of which follow the Post-Redirect-Get pattern: POST the initial cart checkout, create a "pending order" state (or similar), redirect to the page for that state. The user can then POST from that page to the next URI to create a "confirmed order" (or similar), which redirects to a receipt page or whatever.
What I've done in the past is have one page that has a 'View' area with labels and then a 'Edit' area with textboxes/dropdowns/etc. You can make them DIVs or TABLES depending on your preference.
User comes to page and gets the edit view so they can use the textboxes. Save/Submit button at the bottom.
Clicking on Save/Submit does a postback, populates the labels with the data they entered, and allows them to view/verify what they entered. Continue and Edit buttons at the bottom.
Edit is a postback and goes back to the edit view.
Continue does the actual save and redirection to a new page that displays the confirmation.
Optionally you could save the data on the confirmation page instead of the first page depending on your preference again.
Actually, you could do this ahead of the submit. In the form submit (wherever that is) add an onlick that fires a modal window with a confirmation button. My personal favorite in this situation is to use a Jquery UI Modal Confirmation dialog.
I personally fire this via means of a Jquery .click statement in the page.
So, the document won't submit until the onclick dependency has been completed and changed to "true" which the example does automatically with the included "ok" button.
I believe that this will gracefully fallback to just not require the confirmation if Javascript is turned off, which itself is becoming more and more of an "edge" case. In fact, some of my most staunch corporate clients are starting to accept limitations such as this case when Javascript is turned off....and they're way more picky that most any of us ever will be.
Then, you're free to submit to any page you'd like. Personally, I've switched all of my forms over to a Jquery .ajax submit, but that's just me. You can do it however you like.