SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Apr 2012
    Location
    New Mexico
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Response-O-Matic Issue

    I need help with the code for the form in 'Build Your Own Web Site the Right Way Using HTML & CSS'.

    The book says to use response-o-matic to make the small form. I went to the response-o-matic site and used their form maker, because they have advanced with the times I'm not completely understanding the code that they are using now. The book and their code don't match up so I don't know what to do and I need a little bit of help.
    The form in the book has:
    5 short answers, choose answer, text box, radio buttons, and a checkbox.

    Small sample from the form that the book is asking me to make:

    HTML Code:
    <label for="contactname" class="fixedwidth">Contact Name</label>
      <input type="text" name="contactname" id="contactname"/>
    </div>
    <div>
      <label for="telephone" class="fixedwidth">Telephone Number</label>
      <input type="text" name="telephone" id="telephone"/>
    </div>
    <div>
      <label for="email" class="fixedwidth">Email Address</label>
      <input type="text" name="email" id="email"/>
    </div>

    Now all the code from Response-O-Matic:

    HTML Code:
    <!-- Begin Response-O-Matic Form -->
    <!-- DO NOT EDIT YOUR FORM HERE, PLEASE LOG IN AND EDIT AT RESPONSE-O-MATIC.COM -->
    <form enctype="multipart/form-data" method="post" action="http://www.response-o-matic.com/mail.php" accept-charset="UTF-8">
    	<div>
    		<input type="hidden" name="acctid" id="acctid" value="h6owjyghbwpu0p2o" />
    		<input type="hidden" name="formid" id="formid" value="1219813" />
    		<input type="hidden" name="required_vars" id="required_vars" value="field-be79efab72bdbd0,field-f3017903afe5222,email,field-a0b64f8b1feffac,field-83c4c26898df2fc,field-969ab8427183e0b,field-cf1e74c36e703da,field-84e857a8376cfba,field-b0a45067db8944e" />
    	</div>
    	<table cellspacing="5" cellpadding="5" border="0">
    		<tr>
    			<td valign="top">
    				<strong>Contact Name</strong>
    			</td>
    			<td valign="top">
    				<input type="text" name="field-be79efab72bdbd0" id="field-be79efab72bdbd0" size="40" value="" />
    				
    			</td>
    		</tr>
    		<tr>
    			<td valign="top">
    				<strong>Telephone Number</strong>
    			</td>
    			<td valign="top">
    				<input type="text" name="field-f3017903afe5222" id="field-f3017903afe5222" size="40" value="" />
    				
    			</td>
    		</tr>
    		<tr>
    			<td valign="top">
    				<strong>Email Address:</strong>
    			</td>
    			<td valign="top">
    				<input type="text" name="email" id="email" size="40" value="" />
    				
    			</td>
    		</tr>
    		<tr>
    			<td valign="top">
    				<strong>What's the event called?</strong>
    			</td>
    			<td valign="top">
    				<input type="text" name="field-a0b64f8b1feffac" id="field-a0b64f8b1feffac" size="40" value="" />
    				
    			</td>
    		</tr>
    		<tr>
    			<td valign="top">
    				<strong>When's the event happening?</strong>
    			</td>
    			<td valign="top">
    				<input type="text" name="field-83c4c26898df2fc" id="field-83c4c26898df2fc" size="40" value="" />
    				
    			</td>
    		</tr>
    		<tr>
    			<td valign="top">
    				<strong>What region is the event in?</strong>
    			</td>
    			<td valign="top">
    				<select name="field-969ab8427183e0b" id="field-969ab8427183e0b">
    					<option value="South-west">South-west</option>
    					<option value="South-east">South-east</option>
    					<option value="Midlands">Midlands</option>
    					<option value="Central">Central</option>
    					<option value="London">London</option>
    					<option value="East">East</option>
    					<option value="North">North</option>
    					<option value="Scotland">Scotland</option>
    					<option value="Northern Ireland">Northern Ireland</option>
    					<option value="Overseas (see details below)">Overseas (see details below)</option>
    				</select>
    				
    			</td>
    		</tr>
    		<tr>
    			<td valign="top">
    				<strong>More details (as much as you think we'll need!)</strong>
    			</td>
    			<td valign="top">
    				<textarea name="field-cf1e74c36e703da" id="field-cf1e74c36e703da" rows="6" cols="40"></textarea>
    				
    			</td>
    		</tr>
    		<tr>
    			<td valign="top">
    				<strong>What would be the best time to call you on the number supplied?</strong>
    			</td>
    			<td valign="top">
    				<input type="radio" name="field-84e857a8376cfba" id="field-84e857a8376cfba_0" value="In the morning" /> In the morning<br/>
    				<input type="radio" name="field-84e857a8376cfba" id="field-84e857a8376cfba_1" value="In the afternoon" /> In the afternoon<br/>
    				<input type="radio" name="field-84e857a8376cfba" id="field-84e857a8376cfba_2" value="In the evening" /> In the evening<br/>
    				<input type="radio" name="field-84e857a8376cfba" id="field-84e857a8376cfba_3" value="No calls please" /> No calls please<br/>
    				
    			</td>
    		</tr>
    		<tr>
    			<td valign="top">
    				<strong>Please confirm if you are happy for us to do this.</strong>
    			</td>
    			<td valign="top">
    				<input type="checkbox" name="field-b0a45067db8944e[]" id="field-b0a45067db8944e_0" value="I am happy for this event to be publicized outside of and beyond BubbleUnder.com, where possible" /> I am happy for this event to be publicized outside of and beyond BubbleUnder.com, where possible<br/>
    				
    			</td>
    		</tr>
    		<tr>
    			<td colspan="2" align="center">
    				<input type="submit" value=" Submit Form " />
    			</td>
    		</tr>
    	</table>
    </form>
    <br><center><font face="Arial, Helvetica" size="1"><b>
    Get your own <a href="http://www.response-o-matic.com">free form</a> like this one.
    </b></font></center>
    <!-- End Response-O-Matic Form -->
    I hope this helps you help me.
    Thank you for looking this over and for any help that you can give me.
    Last edited by Mittineague; Jan 9, 2014 at 21:49. Reason: reformatting bbcode tags

  2. #2
    SitePoint Enthusiast zakelijk's Avatar
    Join Date
    Oct 2012
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I want to help you, but what is your actual question? :O

    This second form is just a form positioned within a table. The id should referrer to the name of the attribute in the stylesheet. The name in every "Select or Input" code is referring to the php-script to handle the form server-side.... in this case : http://www.response-o-matic.com/mail.php ... you should open both and check out how they put the names of all selects in variables... so let's say:

    Code:
    <input type="text" name="field-f3017903afe5222" id="field-f3017903afe5222" size="40" value="" />
    In the : http://www.response-o-matic.com/mail.php code will be something like... $POST_['field-f3017903afe5222'] and they normally then put it in a variable so they can use it when handling the form.. (Something like

    $name = $POST_['field-f3017903afe5222'] ;
    You need to know how you can store a form field into a variable and what you can do with it... basic php skills... if you know how to do that you can understand how a form works and how you can implement it...

    Maybe i'm going to far and you only wanted to learn html/css, but for understanding forms you need to know why people are using the "name element" in a input. If you understand what you can do with that element then you will understand the form

  3. #3
    SitePoint Member
    Join Date
    Apr 2012
    Location
    New Mexico
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I can promise that i will be getting a php book eventually cause yes i would like to learn all the ins and outs of web design, but right now i just want to be able to get past this section of the book.

    Anyway, sorry for not making the question clear.
    The question is: what of the code from response-o-matic am i supposed to use for the form in the book to make it work the way it's supposed to?

    Yes i am 24 which is why i'm not ashamed to admit that i have a little bit of brain damage, so please dumb down the answer a little bit. (The damage is not my fault, i was born this way)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •