Form Handling

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
heatherfeuer

Form Handling

Post by heatherfeuer »

I have created a custom form not using formbuilder.  I am unsure if I have used the proper parameters for form handling.

The code for the form is:

Code: Select all

<div id="form">
<form action="index.php" method="post" name="[object]">
    <p>Please note: Items shown in <strong>Bold</strong> are required.</p>
    <fieldset><legend>Tell us how to get in touch with you:</legend><label accesskey="f" for="firstname">Your name: </label><input id="name" title="your name" tabindex="1" name="name" type="text" /><br />
    <label class="required" accesskey="e" for="email">Your Email: </label><input id="email" title="your email" tabindex="2" name="email" type="text" /><br />
    <label accesskey="p" for="phone">Your Phone: </label><input id="phone" title="your phone" tabindex="3" name="phone" type="text" /><br />
    </fieldset>
    <p> </p>
    <fieldset><legend>Enter your comments in the space provided:</legend><label accesskey="c" for="comments">Comments: </label><textarea id="comments" title="comments" tabindex="4" rows="6" cols="30" name="comments"></textarea><br />
    <input id="ContactRequested" title="contact requested" tabindex="5" type="checkbox" valign="bottom" name="ContactRequested" value="on" /> Please contact me as soon as possible regarding this matter. </fieldset> <label for="kludge"></label><input id="submit" tabindex="5" type="submit" value="Send" />  <input id="reset" tabindex="6" type="reset" value="Reset" />
</form>
</div>
In the form tag, what should I be using for action? 

Help appreciated!
cyberman

Re: Form Handling

Post by cyberman »

You have to use an action (script) for mail forwarding :). But if I made a look at your source you can/should modify contact_form (source) so it will do it for you.
heatherfeuer

Re: Form Handling

Post by heatherfeuer »

I know that I need to point to a script of some kind.  I'm used to using a CGI script for that.  Since I'm not using either one of the forms modules, is there a php script that will process the form?
Pierre M.

Re: Form Handling

Post by Pierre M. »

heatherfeuer wrote: I have created a custom form not using formbuilder.  I am unsure if I have used the proper parameters for form handling.
(snip)
In the form tag, what should I be using for action? 
You don't want to use CMSms modules FormBuilder and FormBrowser. You want to code your own way. You must be knowing what you are doing.
Please reread the HTML v2.0 specification to know how to deal with FORMs. This is the CMSms support forum.
Pierre M.
PS : you could put some handling code in a user defined tag, couldn't you ?
heatherfeuer

Re: Form Handling

Post by heatherfeuer »

Pierre,

Did I say I was a control freak?  :D I am...  Problem is, I know my way around html very well, but not much with php.  I like to say I know just enough php to get myself in trouble.  You are right, though.  I found a great solution for what I want in a 3rd party app that works for the time being. 

I had forgotton about the contact_form plugin! (Doh!)  I am going to play around with that to see if I can customize it for the layout I prefer, etc.  I've already created a special forms only template that picks up my custom styles for the forms generated.  Then I could save each form type as a UDT.  I'd use formbuilder (I liked the ease of created form fields), but it doesn't appear to support the "fieldset" tag that helps make forms more accessible.
Pierre M.

Re: Form Handling

Post by Pierre M. »

Cool you have a solution. May be you can get more answers on php.net.
And I've written UDT but may be I was hinking of a GCB  (global content block) as I don't know the difference between the two. Have fun with CMSms and third party solutions.
Pierre M.
Locked

Return to “CMSMS Core”