about form

Discuss the HTML4 features and Web layout provided in QuarkXPress 8 and 9 (and before).

If you are interested in HTML5 publishing, then please visit the section about Digital Publishing and look at HTML5-based apps or HTML5 Publications.
leaudurio
Posts: 15
Joined: 11 Oct 2011, 12:36

about form

Post by leaudurio » 11 Oct 2011, 08:40

hi,i'm looking for help about web form under quark 9.1Exactly i'm looking for help about the scrip what i've to do in php !!!How make it ??? what i have to put inside ???ThanksLeaudurio

shaharaperil
Posts: 54
Joined: 01 Jan 2011, 22:27

about form

Post by shaharaperil » 13 Oct 2011, 09:55

First, watch this Quark tutorial on how to correctly create your form. It's very helpful.
http://vimeo.com/16024793

Then, I found this site to be invaluable in helping me figure out the php script for my website.
http://www.tectite.com/

I designed my form in Quark 9.1, making sure to include hidden form boxes called "subject" and "recipient." The recipient box is basically a text box with the e-mail address of where you want the form data to go. The script does not work unless you define those boxes with those names.

I'm not a programmer, so I downloaded the free FormMail.php script from the site above. You have to read through the script because there are two things within it that you have to change. If I remember correctly, one is an address where errors will be sent (listed in the script as define("DEF_ALERT") and the other is the recipient e-mail (listed in the script as $TARGET_EMAIL = array). If you open the script in a text editor, it will tell you what things you need to change. But be careful to use the same e-mail address format they use in the script or else it won't work. If you have trouble with that, they will also configure the script for you for a fee using their Configuration Wizard. But I was able to figure it out. Also, read through their website's tutorials because they have some good information on there about security and SPAM.

Once the script is configured, I placed the php script in the root folder on my site and programmed my form in Quark to post to the script once the form is submitted.

That's a simplified explanation of something that took me an entire weekend to figure out, but it works beautifully and hopefully it will help you out. I've already executed it on two different websites.

shaharaperil
Posts: 54
Joined: 01 Jan 2011, 22:27

about form

Post by shaharaperil » 14 Oct 2011, 04:21

The video link above is for forms in interactive layouts. I'm sure I saw a video somewhere on creating Quark HTML forms, since that's how I figured out how to do them. But I can't seem to find it, so I will give you the basics. This is what worked for me.

1. Create a web layout in Quark. FILE: NEW: PROJECT: LAYOUT TYPE = WEB

2. Make sure your web tools are visible by selecting WINDOW: TOOLS: SHOW WEB TOOLS.

3. Using the FORM BOX tool (second from the top on the WEB TOOLS pallet), create a background box for the form. Make it large enough to fit all of our form fields and buttons.

4. Click on the form box you just created and select ITEM: MODIFY.

5. Select METHOD: POST.

6. Select ENCODING: FORM DATA.

7. Enter the HTML web link to your FormMail PHP document into the ACTION field. See Step #23.

8. Click on the FORM BOX tool in the WEB TOOLS pallet and hold it down to show the other tools available.

9. Select the TEXT FIELD TOOL and use it to create a field where your user will enter data.

10. Click on the field box you just created and select ITEM: MODIFY.

11. Click over to the FORM tab on the dialogue box.

12. Name your box. Remember, you need to create and name hidden boxes called "RECIPIENTS" and "SUBJECT" for the PHP script to work. Add those to your other fields, such as "realname," "e-mail," "phone number," etc. (NOTE: this specific script requires that you add fields for recipients, subject, realname and email, and each field name must use all lowercase letters.

13. To make the "RECIPIENTS" and "SUBJECT" boxes hidden, select HIDDEN FIELD from the TYPE menu. You don't need to do this for all of your form fields. Just the ones you don't want users to see. They must be positioned on the form background box, but you can move them off to the side so they aren't getting in the way.

14. If you want a field to be required, check the REQUIRED option.

15. Click OKAY and repeat steps 9-14 for all of your other fields.

16. Click on the TEXT FIELD tool in the WEB TOOLS pallet and hold it down to show the other tools available.

17. Select the BUTTON TOOL and use it to create a submit button at the bottom of your form.

18. Switch to the TEXT CONTENT TOOL and click inside the button box to add some text, such as the word "SUBMIT."

19. With the TEXT CONTENT TOOL still selected, click into the RECIPIENTS field you created and type in the e-mail address where you want the form to go to.

20. With the TEXT CONTENT TOOL still selected, click into the SUBJECT field you created and type in the subject you want to appear on all the e-mails you receive from this form.

21. Don't forget to create a text box and use it to create labels for your fields so users know what data to enter. If I remember correctly, the video I watch suggested converting those field labels to graphics. I can't remember why. But you can do this by selecting the text boxes you create to name the field and selecting ITEM: MODIFY. At the bottom of that dialogue box, check off CONVERT TO GRAPHIC ON EXPORT.

22. Now, SAVE and EXPORT your page as HTML and upload it to your web server.

23. After you have configured the PHP script as described above, upload that to the web server too. Remember it must be placed in the location you specified in Step #7. It doesn't have to be in the cgi-bin. Just make sure the correct location is indicated.

24. Now test your form. After clicking submit, an email should be sent to your e-mail address with the form data. Or, if something went wrong, the PHP script should give you an error message.

The only problem I have had with the above is that my forms are submitted even if "required" fields are blank. But that isn't a huge issue for me. If I figure out why that's happening, I'll edit this post. But I was so happy to get this far that I'm not really bothered by it.

shaharaperil
Posts: 54
Joined: 01 Jan 2011, 22:27

about form

Post by shaharaperil » 14 Oct 2011, 05:07

Here is a sample of the results I was able to get using the steps mentioned above.

Quark HTML Form

leaudurio
Posts: 15
Joined: 11 Oct 2011, 12:36

about form

Post by leaudurio » 14 Oct 2011, 05:41

HOOO,Thanks a lot manI'm going to learn it now !!!Thanks very much,i tell you at night for say you if it work.

leaudurio
Posts: 15
Joined: 11 Oct 2011, 12:36

about form

Post by leaudurio » 14 Oct 2011, 11:12

YES !!!!!I don't know how to say thanks !!!OK IT WORKS !!!If you didn't say me for the hidden boxes (recipient and subject) I'll still looking for that !!!I didn't see it in any documentation or user guide !Thanks very much

shaharaperil
Posts: 54
Joined: 01 Jan 2011, 22:27

about form

Post by shaharaperil » 15 Oct 2011, 02:37

You're welcome. I'm glad it worked for you. :)

You MAY not need the "recipient" and "subject" boxes if you are using a script other than the one I mentioned above. But since that FormMail script does appear to require them, I figured I would mention it since I didn't see any documentation on that either and it took me a while to troubleshoot why my form wasn't working.

Thom_Print
Posts: 0
Joined: 22 Feb 2012, 16:01

about form

Post by Thom_Print » 25 Jul 2012, 07:34

Hey - thanks so much for this - couldn't find it anywhere on quarkED - the only problem i am having with it is step #7 and #23. Very new to the scripting business - but I literarally have no idea what to write in the ACTION field, or the TARGET field...
as far as step #23 goes - what script do i have to make..?!

thank you for your time in replying.
Tom

shaharaperil
Posts: 54
Joined: 01 Jan 2011, 22:27

about form

Post by shaharaperil » 25 Jul 2012, 15:13

When you're setting up a form, you have to have a file (script) on your web server that tells the form what to do with your form data. In this case, I used a PHP script called FormMail.php... which is basically just a text file full of coded instructions saved with .php as the extension. If you check a few replies above, I included a link to the site where I downloaded the script/PHP file that I used. It's free and will save you a lot of headaches to get one already written.

Once you download it, you have to open it in a text editor and read through it a bit. There are two things in it (also mentioned above) that you need to change for it to work that have to do with the e-mail address you want your form data to be sent to and your domain name where errors will be sent.

After you have that FormMail.php file set up, step 23 explains that you need to upload the FormMail.php file to your web server in the main root folder... the same location where your index.htm file would be. So, for example, if your site was http://www.WonderWomanMovie.com, the path to the file would be:

http://www.wonderwomanmovie.com/FormMail.php

That is exactly the HTML web link that you need to paste into the ACTION field in step 7. Calling it ACTION is misleading, since what you really need in this instance is just the web address to your PHP form... or whatever type of file you are using to process your form data.

For the target field, I think you can select _self if you want the form to be submitted using the current browser window or _blank if you want it to open a new browser window. I have mine set to _self.

One other thing to note, if you use the form script I mention above, while you're editing it, you may want to search for the term "MSG_THANKS_PAGE" within the script and add a link that takes users back to your website from the thank you page they will see after submitting a form. Otherwise, they have to use the BACK button in their browser. You can do this by just pasting in a standard HTML link to your home page in the following format:

'Thanks! We\'ve received your information '.
'and we\'ll be in '.
'contact with you soon. [a href="/index.htm"] Back To Site.[/a]';


Note: I used brackets in place of the symbols normally used to tag HTML because they will not show up in this forum otherwise.

Thom_Print
Posts: 0
Joined: 22 Feb 2012, 16:01

about form

Post by Thom_Print » 26 Jul 2012, 06:56

Hi,

thank you so much for your help and quick reply - so I've had a go and got excited at doing this. Unfortunately my efforts so far have been in vain. Below are four images:
This shows my email in the coding - is this entered correctly? I wasn't sure if I should put the entire email address in that space..

Image
This shows the selections within the form box its self.

Image This then shows data entered into the form box before it is submitted.

Image This is what appears on my page after I click submit.

Image So I am definately going wrong somewhere with this, but I am not quite sure where..
I look forward to hearing from you, regards.

Tom Groom

Locked

Return to “QuarkXPress 8 & 9: Web authoring (HTML4) - discontinued”