epeeist
Newbie
Offline
Posts: 2
|
 |
« on: June 07, 2006, 10:10:22 pm » |
|
This does almost exactly what I want after a small amount of hacking - thanks very much.
What I am trying to do is a two page form, the first page extracting the information from the user and the second presenting the information in a printable format, almost like a tear off slip on an entry form.
Using your code I can get the two pages that I require, but I can't work out how to print just the content pane on the second page. Ideally I would like to add a print button but I am not sure how to do this.
|
|
|
|
|
Logged
|
|
|
|
|
boldee
|
 |
« Reply #1 on: June 07, 2006, 11:53:41 pm » |
|
Im afraid im not to sure about printing myself but ill look into it.
|
|
|
|
|
Logged
|
|
|
|
|
facile
|
 |
« Reply #2 on: June 08, 2006, 03:47:46 am » |
|
You might want to take a look into the RNM package how the print button is implemented. Basicly it opens a popup window and with only the information you want to print, and calls the print dialog of the browser. After printing it closes the popup again.
|
|
|
|
|
Logged
|
Peter
|
|
|
tschier
Newbie
Offline
Posts: 4
|
 |
« Reply #3 on: June 08, 2006, 11:54:57 am » |
|
What it doesThis is a simple form with two input pages and a confirmation page, this example package shows how to gather data from textfield elements, radio button elements and select list elements and then display them in a confirmation page using static html. Examining the validation scripts for the radio buttons and finalise button will show all the code needed for the form to function. The form can be used in two ways, either to show data about to be sent/stored or data that has just been sent/stored. As with all my packages you can see a working example at boldee.com in the Facile forms section. What the heck is the example supposed to show me - all that gobble de gook xml code  Can't someone just provide a sample script for how to redirect users after they submit a form to a specific page on the website! Surely this is a fundamental requirement of a forms component. I'm not a techie. I've managed to get Facile Forms working now I just want to be able to send users to a thank you page 
|
|
|
|
|
Logged
|
|
|
|
|
boldee
|
 |
« Reply #4 on: June 08, 2006, 12:06:18 pm » |
|
Dont worry its easy to sort out just go into ff config and you will see install package select the package file and install, then it will appear in your forms list.
Its very hard to explain sometimes with example code alone somtimes you need a working example to use as reference.
|
|
|
|
|
Logged
|
|
|
|
elona
Newbie
Offline
Posts: 13
|
 |
« Reply #5 on: June 08, 2006, 02:42:14 pm » |
|
eepeist did you solve it with the print button? I have the same problem as you, I tried to implement the print button as in RNM package, but it didn`t work. I am a newbie, and I don`t know exactly how to print only the info that is in the form. Pls if smb can help..
|
|
|
|
|
Logged
|
|
|
|
drijn
Newbie
Offline
Posts: 24
|
 |
« Reply #6 on: June 09, 2006, 01:01:59 pm » |
|
hello there I would also like to have some help about editing a printable page with the result of the form in it and with a print button, thanks!
|
|
|
|
|
Logged
|
|
|
|
epeeist
Newbie
Offline
Posts: 2
|
 |
« Reply #7 on: June 11, 2006, 09:40:35 am » |
|
eepeist did you solve it with the print button? I have the same problem as you, I tried to implement the print button as in RNM package, but it didn`t work. I am a newbie, and I don`t know exactly how to print only the info that is in the form. Pls if smb can help..
I looked at the RNM package too, but like you I haven't managed to make it work as yet.
|
|
|
|
|
Logged
|
|
|
|
|
facile
|
 |
« Reply #8 on: June 11, 2006, 03:58:15 pm » |
|
To no longer hijack this thread, please continue with the printing questions in this thread.
|
|
|
|
|
Logged
|
Peter
|
|
|
tribun99
Newbie
Offline
Posts: 1
|
 |
« Reply #9 on: June 27, 2006, 12:24:44 pm » |
|
Thanks to boldee for that! But i have problems to store the given data in database. I have an 2 page-form. first page ist the form, second page show the given values. The JS at the "final"-botton: function ff_final_action(element, action) { // validate form var error = ff_validation(0); if (error != '') { alert(error); ff_validationFocus(''); return; } // if
//get user input values var firma = ff_getElementByName('firma').value; var anrede = ff_getElementByName('anrede').value; var vorname = ff_getElementByName('vorname').value; var nachname = ff_getElementByName('nachname').value; var strasse_nr = ff_getElementByName('strasse_nr').value; var plz = ff_getElementByName('plz').value; var ort = ff_getElementByName('ort').value; var land = ff_getElementByName('land').value; var telefon = ff_getElementByName('telefon').value; var fax = ff_getElementByName('fax').value; var isdn = ff_getElementByName('isdn').value; var email = ff_getElementByName('email').value; var homepage = ff_getElementByName('homepage').value; var ustidnr = ff_getElementByName('ustidnr').value; var artikelnummer = ff_getElementByName('artikelnummer').value; var bestellmenge = ff_getElementByName('bestellmenge').value; var versandart = ff_getElementByName('versandart').value; var liefertermin = ff_getElementByName('liefertermin').value; var bemerkung = ff_getElementByName('bemerkung').value;
// write to static text element on page 2 var confirm = ff_getDivByName('confirm'); confirm.innerHTML = '<p>'+firma+' '+anrede+' '+vorname+' '+nachname+' '+strasse_nr+' '+plz+' '+ort+' '+land+' '+telefon+' '+fax+' '+isdn+' '+email+' '+homepage+' '+ustidnr+' '+artikelnummer+' '+bestellmenge+' '+versandart+' '+liefertermin+' '+bemerkung+'</p>'; // Submit Data [color=red] ff_submitForm();[/color]
// switch to next page ff_nextpage();
} // ff_final_action By pressing the submit-button an server-error comes up(might be the ff_submitForm()-function...). How to store the values in database? How can i show values from an radio-button or an checkbox? Thanks tribun
|
|
|
|
|
Logged
|
|
|
|
|
boldee
|
 |
« Reply #10 on: June 27, 2006, 02:19:15 pm » |
|
I deliberatly left out the submit part as ppl have different requirements for how when and where they do there submit.
I am asuming that the color red part is somthing u have tried to add to the code for the forum but if not it wont like that. If you can detail the error better it would help.
I would suggest you view the rock and roll contest sample form if you have not submitted to a db before with ff, that will show you how to submit all manner of form elements.
|
|
|
|
|
Logged
|
|
|
|
knoorla
Newbie
Offline
Posts: 2
"computer says no.."
|
 |
« Reply #11 on: July 09, 2006, 07:51:21 pm » |
|
Hi, This package is exactly what I needed.  Thanks very much. The only thing I would like to add to this is the random string code that you can find in the documentation of this site. I m new to ff and I can't figure out how to do this. Could someone please explain in short to me how to add this code, so that every user also sees a random code on the confirmation page. Thanks again, Kev
|
|
|
|
|
Logged
|
|
|
|
|
boldee
|
 |
« Reply #12 on: July 09, 2006, 09:10:53 pm » |
|
im working on it for you actualy, i read your post and started to make a new form based on the confirm package. I had just about cracked it when my hard drived died, im not doing v well atm my hdd and my webb site going tits up over a 2 week period lol
|
|
|
|
|
Logged
|
|
|
|
|
boldee
|
 |
« Reply #13 on: July 11, 2006, 04:57:27 pm » |
|
Knoorla attached what you asked for, the modded confirm package. It submits the form and creates a 6 digit pin number (000001-999999) which is unique, the pin generation bit is in the begin submit. Pay attention to the before form piece also this will create a table called mos/jos_pin in your database, it also retreives the parameter value after submit so you can confirm user details.
As far as i can tell it should be ok but any problems with the pins clashing let me know.
|
|
|
|
Logged
|
|
|
|
josey
Newbie
Offline
Posts: 9
|
 |
« Reply #14 on: July 13, 2006, 12:52:49 am » |
|
this is awesome stuff.
to back up a bit, as a newbie with just two forms made, i need the confirm page to go to a unique url to track with google's conversion tool.
i installed the confirm package see how it works, but i need it to go to a unique url? is this compicated?
basically, i need to put the google conversion code somewhere? and i can't figure where this static html spot would be to place this code?
thanks for all your help already
|
|
|
|
« Last Edit: July 13, 2006, 01:33:03 am by josey »
|
Logged
|
|
|
|
|