HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


XHTML Feedback

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#30155 (In Topic #6931)
Avatar

Fan in action


I am trying to get the following html code int xhtml formate so i can place it on my feedback page… can anyone help?  or offer a better solution?


Code

<form method="POST" action="contact.php">
Fields marked (*) are required

<p>Name:<br>
<input type="text" name="Name">
<p>Email:<br>
<input type="text" name="Email">
<p>Message:<br>
<textarea name="Message"></textarea>
<p><input type="submit" name="submit" value="Submit">
</form>
Back to the top
 
Posted
Rating:
#30156
Avatar

Code

 <form method="post" action="contact.php">
<p>Fields marked (*) are required</p>

<p><label for="Name">Name:<br />
<input value="" type="text" id="Name" name="Name" /></label></p>
<p><label for="Email">Email:<br />
<input value="" type="text" id="Email" name="Email" /></label></p>
<p><label for="Message">Message:<br />
<textarea cols="30" id="Message" name="Message"></textarea></label></p>
<p><input type="submit" name="submit" value="Submit" /></p>
</form>

What I changed…
For XHTML:
  • All tags opened must also be closed
    • So <p>'s need to be matched with </p>'s
    • Tags that don't wrap around things (br, input) need to be "self closing" (they end />)
  • Input tags must be given a default value attribute, even if it's just a blank one (don't ask me why, I don't know…)
  • The textarea tag must be given a column count (probably because the default is unlikely to be ideal)
  • "post" not "POST"
For Semantics:
  • Text shouldn't be left hanging loose (so the "Fields marked…" text was put in a paragraph)
For accessibility:
  • All input fields must have labels defined (so I gave them ID's and then wrapped the label tag around the label and the field input)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#30160
Avatar

Fan in action

its now telling me Codenames must not contain spaces or other non alpha-numeric symbols.
Back to the top
 
Posted
Rating:
#30161
Avatar

Fan in action

here is the exact code I am entering

Code

[title="1"]{!FEEDBACK}[/title]Please leave us some constructive feedback. Feedback is kept private.

[html]<form method="post" action="http://wildsurvival.org/contact.php">
<p><label for="Name">Name:<br />
<input value="" type="text" id="Name" name="Name" /></label></p>
<p><label for="Email">Email:<br />
<input value="" type="text" id="Email" name="Email" /></label></p>
<p><label for="Message">Message:<br />
<textarea cols="30" id="Message" name="Message"></textarea></label></p>
<p><input type="submit" name="submit" value="Submit" /></p>
</form>[/html]
Back to the top
 
Posted
Rating:
#30164
Avatar

It sounds like you are trying to create a page with an invalid name.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#30166
Avatar

Fan in action

Where am I specifying a name?   and the page comes stock with ocportal so why would it be invalid?
Back to the top
 
Posted
Rating:
#30167
Avatar

Fan in action

Opps nevermind it works fine!  I was trying to change the codename from feedback to Contact US  so that it would read diffrent on page  Sorry Chris.. Thanks for your help
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: