473,729 Members | 2,348 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form Layout and Formatting

nathj
938 Recognized Expert Contributor
Hi,

I am working on new version of a site that requires an application form for membership, this is so that certain features of the site are only available to members. The site is aimed at Church Leaders and requires a lot of information from them. I have two questions relating to form layout and formatting.

1) How do you remove the border from a text area?
2) How do you format an input text field to display a date format of dd/mm/ccyy?

Being able to do this would improve the display of the form and the usability of the form.

Unfortunately all of the development is local and so I am not able to the show an example. Howver, the code of note at this point is:

HTML:
Expand|Select|Wrap|Line Numbers
  1. <form action="application.php" method="post">
  2.     <div class="row">
  3.         <h4 class="eventListItem">Personal Details </h4>
  4.     </div>
  5.  
  6.     <div class="row">
  7.         <span class="label">
  8.             Forename(s):
  9.         </span>
  10.         <span class="formw">
  11.             <input type="text" size="30" />
  12.         </span>
  13.     </div>
  14.  
  15.     <div class="row">
  16.         <span class="label">
  17.             Surname:
  18.         </span>
  19.         <span class="formw">
  20.             <input type="text" size="30" />
  21.         </span>
  22.     </div>
  23.  
  24.     <div class="row">
  25.         <span class="label">
  26.             Date of Birth:
  27.         </span>
  28.         <span class="formw">
  29.             <input type="text" size="30" />
  30.         </span>
  31.     </div>
  32.  
  33.     <div class="row">
  34.         <span class="label">
  35.             Note:
  36.         </span>
  37.         <span class="formw">
  38.             <textarea cols="30" rows="8">
  39.             </textarea>
  40.         </span>    
  41.     </div>
  42.  
  43.     <div class="row">
  44.         <span class="label">
  45.             Gifting:
  46.         </span>
  47.         <span class="formw">
  48.             <textarea cols="30" rows="8"> 
  49.             </textarea>
  50.         </span>    
  51.     </div>
  52.  
  53.     <div class="row">
  54.         <span class="label">
  55.             Specialist subject:
  56.         </span>
  57.         <span class="formw">
  58.             <textarea cols="30" rows="8"> 
  59.             </textarea>
  60.         </span>    
  61.     </div>
  62.  
  63.     <div class="row">
  64.             <h4 class="eventListItem">Contact Details</h4>
  65.     </div> 
  66.  
  67. </form>
  68.  
CSS
Expand|Select|Wrap|Line Numbers
  1. /* Form Design */
  2.  
  3. div.row 
  4. {
  5.     clear: both;
  6.     padding-top: 3px;
  7.     padding-bottom: 5px;
  8. }
  9.  
  10. div.row span.label 
  11. {
  12.     padding-left: 10px;
  13.     padding-right: 0px;
  14.     float: left;
  15.     width: 100px;
  16.     text-align: right;
  17. }
  18.  
  19. div.row span.formw 
  20. {
  21.     float: right;
  22.     width: 455px;
  23.     text-align: left;
  24.  
Any help with this greatly appreciated.

Nathan
Jun 25 '07 #1
11 2432
nathj
938 Recognized Expert Contributor
I sorted the textarea border with the following in CSS:

Expand|Select|Wrap|Line Numbers
  1. span.formw textarea
  2. {
  3.     border:0px;
  4. }
  5.  
I still haven't figured out the date thing though, so if anyone knows please let me know.

Cheers
Nathan
Jun 25 '07 #2
drhowarddrfine
7,435 Recognized Expert Expert
Neither html nor css will format for you.
Jun 25 '07 #3
gits
5,390 Recognized Expert Moderator Expert
hi ...

you may format the value that has to be shown in the textbox with javascript ... do you get the data from the users input or is it a readonly-field that is filled with data from the server?

kind regards ...
Jun 25 '07 #4
nathj
938 Recognized Expert Contributor
hi ...

you may format the value that has to be shown in the textbox with javascript ... do you get the data from the users input or is it a readonly-field that is filled with data from the server?

kind regards ...
Hi,

It would be both potentially. Though I have decided that we don't need that piece of information at this stage. However, I will at a later date be using a dates from the admin side of the system so if you have any tips or tricks they would be greatly appreciated.

nathj

ps sorry for the delay in replying
Jun 28 '07 #5
gits
5,390 Recognized Expert Moderator Expert
hi ...

using javascript you may do the following for example:

Expand|Select|Wrap|Line Numbers
  1. // orig date-string
  2. var date = '2006-11-01'; 
  3.  
  4. // we split it with an regEx
  5. var splitted_date = date.match(/(\d{4})-(\d{2})-(\d{2})/); 
  6.  
  7. // now we combine the result to our needs
  8. var new_date = splitted_date[3] + '.' + splitted_date[2] + '.' + splitted_date[1];
  9.  
  10. // create an alert to show new date-format: '01.11.2006'
  11. alert(new_date);
  12.  
kind regards ...
Jun 29 '07 #6
nathj
938 Recognized Expert Contributor
hi ...

using javascript you may do the following for example:

Expand|Select|Wrap|Line Numbers
  1. // orig date-string
  2. var date = '2006-11-01'; 
  3.  
  4. // we split it with an regEx
  5. var splitted_date = date.match(/(\d{4})-(\d{2})-(\d{2})/); 
  6.  
  7. // now we combine the result to our needs
  8. var new_date = splitted_date[3] + '.' + splitted_date[2] + '.' + splitted_date[1];
  9.  
  10. // create an alert to show new date-format: '01.11.2006'
  11. alert(new_date);
  12.  
kind regards ...
Hi,

Thanks for the tip, that's a great way to reformat a date, I'm sure it will be very useful.

nathj
Jun 29 '07 #7
gits
5,390 Recognized Expert Moderator Expert
... ;) it's a simple way ;) ... come back when you have more questions about that - may be an other format (either input our output) ... and note: you may reformat the date at the serverside already ... that's up to you ...

kind regards ...
Jun 29 '07 #8
nathj
938 Recognized Expert Contributor
... ;) it's a simple way ;) ... come back when you have more questions about that - may be an other format (either input our output) ... and note: you may reformat the date at the serverside already ... that's up to you ...

kind regards ...
One further question I have is that on my form I have 3 textareas and when control passes to them the cursor is not flush to the top left corner.

Expand|Select|Wrap|Line Numbers
  1.     <div class="row">
  2.         <span class="label">
  3.             Note:
  4.         </span>
  5.         <span class="formw">
  6.             <textarea id="note" cols="44" rows="8" title="Extra details, hobbies, a personal biog">
  7.             </textarea>
  8.         </span>    
  9.     </div>
  10.  
Expand|Select|Wrap|Line Numbers
  1. div.row 
  2. {
  3.     clear                : both;
  4.     padding-top            : 3px;
  5.     padding-bottom        : 5px;
  6. }
  7.  
  8. div.row span.label 
  9. {
  10.     padding-left        : 10px;
  11.     padding-right        : 0px;
  12.     float                : left;
  13.     width                : 100px;
  14.     text-align            : right;
  15. }
  16. div.row span.formw 
  17. {
  18.     float                : right;
  19.     width                : 455px;
  20.     text-align            : left;
  21.  
  22. input, textarea, select
  23. {
  24.     font-family            : verdana, "trebuchet MS", helvetica,    sans-serif;
  25.     padding                : 0px;
  26.     font-size            : 10px;
  27.     background-color    : #ffffff;
  28.     border                : inset 1px #eff5f3;
  29. }    
  30.  
any ideas what could be causing this? The textare in question comes after three input type="text" fields, all wrapped nicely in a form.
Jun 29 '07 #9
gits
5,390 Recognized Expert Moderator Expert
;) simply remove all the spaces between start & end-tag of your textarea ... then it will work as you expect:

[HTML]<textarea id="note" cols="44" rows="8" title="Extra details, hobbies, a personal biog"></textarea>[/HTML]
kind regards ...
Jun 29 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

12
5912
by: dave | last post by:
Hello, I've got a site project that i've got to design a layout without resorting to tables. I want to use a table for tabular data not any formatting layout, primarily emphasis needs to be on using css to place form elements. My method thus far has been to use a table, for several reasons i don't want to resort to this, i'd rather place the elements with css and get a standards compliant site. I am uncertain as to how to accomplish this....
2
5137
by: JK | last post by:
Hi All, I am working a form which is tabular layout (continuous form) which will display multiple records at a time. Each line of record needs to be reflected on the color code to show their current status. In Access 2000, you can only write the code on each control in a general way and the code will apply on to the current record. For instance, if you have 5 customers in display, each one of them has difference balance, if you like to...
5
3087
by: Richard | last post by:
Hi, I have a form that take some time to load due to many comboboxes and at least 8 subforms. When I filter or sort the main form I get an error message and then Access shuts down. They ask if I want to send the error report to Microsoft. Has anybody seen this type of error message and what can I do to prevent it from happening. Am I doing something illegal in my code? It used to work but I have added conditional formatting to a subform...
2
2606
by: Terry | last post by:
I have cerated a Form, ExamsFrm, which is used to input details of exams taken at several Centres. It dosplays details from StudentTbl and has a SubForm which displays details from ExamsTble. I have incorporated some VB6 code as well as some Conditional Formatting. The code automatically updates CheckBoxes in the SubForm, depending on exam results, and the Conditional Formatting changes background colours, depending on CheckBox datum. ...
1
1260
by: Eric | last post by:
Couple of general webform questions. Most are about html code created/managed by the editor. I work in GridLayout Mode. 1. Is there a reference or guideline for how the html should appear when viewing a web form in HTML format, after you've added elements in design view? Can I change they way they are formatted for viewing? 2. What's the easist way to clone a webform while inside a project. I don't want to inherit from it, I just want...
1
1528
by: darrel | last post by:
I have a form that has validators for each field. When I submit the form, if the field is invalid, it shows an error next to the field. Works perfectly. I also have a label at the top of the form that, if page is NOT valid, will display. This message says 'there is a problem with the form, please fix the fields below'. What I'd like to do is have that message also state which of the fields were invalid.
10
3060
by: Perry van Kuppeveld | last post by:
Hi, I have a problem with formatting a table including text fields wich can contain up to 255 chars. I need a table with 3 columns: - First column 50 % over the with a rowspan of the total number of rows. - Second column 25 %, no rowspan - Third column 25 %, no rowspan
38
3290
by: Sanders Kaufman | last post by:
I'm converting my table-based layouts to css-positioned divs - but the ONLY reason I'm doing it is because it's *considered* a best practice. I don't really see where anything goes hinky when tables are used - but I'm doing it anyway because the HTML and CSS specs says to reserve tables for tabular data. So as I convert my login widgit to a css thing, I'm saying to myself - hey, this form is most certainly "tabular data" - even if it...
0
8917
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9426
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9281
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9142
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8148
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6022
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3238
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.