I have a Window with a Tabbed control. On one tab I have a few Textfields that get populated from a data source. On another tab I have a HTMLviewer that displays a URL which is a fillable form (it’s a SurveyMonkey form).
Is there a way to programmatically transfer (copy/paste or ?) data displayed in the text fields to specific fields on the Surveymonkey web form?
Currently I have Buttons for each text field that allow the user to copy the text to the clipboard and they can do a simple paste on the Surveymonkey form but they have to do them one at a time. While that is not a big issue, it does leave it open to user error whereby they paste the wrong info sometimes. I’d like to eliminate that somehow by having one button that will transfer all necessary fields of data to the appropriate fields on the Surveymonkey form.
If so, can anyone point me to some code example or suggest how to code it.
Where %fieldID% is the id of the field on the webpage, and %myValue% is the value you’d like to insert. Remember to escape the value so that it doesn’t break the javascript should it contain a single quote, linebreak, or the like.
[quote=253782:@Tim Parnell]So you’re forging your SurveyMonkey results? Doesn’t that defeat the purpose?
[/quote]
Thanks Tim, I’ll give that a try.
No, not forging at all. The user either has to copy from each text field on the first tab and paste it at a corresponding field on the Surveymonkey form. ie. LastName -> LastName; WorkOrderNumber - > WorkOrderNumber and so on. What happens is they might get the LastName into the WorkOrderNumber field on the Surveymonkey form without noticing it. The results of the Surveymonkey come back to me for processing and reporting and I wind up having to FIX their mistakes.
OK, checked into that but each new Surveymonkey form, the fields have different IDs.
FWIW, we receive data from a client, do the Survey and fill out the form for each record in the data set. This would be known as Week1 as an example.
Then Week2 data arrives and a new Surveymonkey URL is created. We do this over and over for each week of the year. Each week’s data set might contain 200 - 600 records (aka surveys).
Thanks Paul, I’ve looked into that [some] … appears too complicated for my needs. I’m thinking there’s no simple method of doing this other than what I’ve already got. Guess I’ll just have to ‘crack the whip’ on our agents to be more dilligent.
Where %fieldID% is the id of the field on the webpage, and %myValue% is the value you’d like to insert. Remember to escape the value so that it doesn’t break the javascript should it contain a single quote, linebreak, or the like.[/quote]
Tim, I’m trying to get this to work but keep getting an OLEexception error. Specifically what is ‘document’ … is that a generic example whereby I need to put the real reference or???
I don’t know if that’s causing the error or exactly what.
Do I need the % signs?
[quote=253875:@Tim Parnell]Yeah, lol, the % are just what I use for placeholders. I can glance at them and know it’s a placeholder
Take them out of your code and it should work.[/quote]