Page 1 of 1

help with php -html code

Posted: Mon Oct 24, 2005 6:57 pm
by rami
Jcart | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]


it is not totally php question but related to it
i have a text area in form of php which inserts data to text filed of table

Code: Select all

<tr>
<td width="41%"><b>Remarks and Assignment Description</b></td><br>
            <td width="59%">
  <textarea name="remarks" cols="40" rows="5">name        marks     Submitted date
harry
rami</textarea></td>
          </tr>
Can those initial field be made undeleteable..poster can write in that text box what ever they like but they are not allowed to delete those initial values

how can it be done

Can a data in tabular form can be brought as initial value inside that text area ...if yes how

thanks for help


Jcart | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]

Posted: Mon Oct 24, 2005 7:01 pm
by Charles256
psh i'd make the width and what not incredibly small (just big enough to view) (maybe even go so far as to put each thing in it's own text field), then beside it put more text fields(boxes)for them to fill in the information an while processing for the form combine the appropriate fields and then perhaps store the information in an array to pull out later? or hell just upload into appropriate fields in a database...wow...you could turn this into something fun.... :: stops himself:: yeah...

Posted: Mon Oct 24, 2005 7:11 pm
by rami
Charles256 wrote:psh i'd make the width and what not incredibly small (just big enough to view) (maybe even go so far as to put each thing in it's own text field), then beside it put more text fields(boxes)for them to fill in the information an while processing for the form combine the appropriate fields and then perhaps store the information in an array to pull out later? or hell just upload into appropriate fields in a database...wow...you could turn this into something fun.... :: stops himself:: yeah...
i didn't got you could you be more clear
thanks for reply

Posted: Mon Oct 24, 2005 7:21 pm
by Charles256
psh i'd make the width and what not incredibly small (just big enough to view) (maybe even go so far as to put each thing in it's own text field), then beside it put more text fields(boxes)for them to fill in the information an while processing for the form combine the appropriate fields and then perhaps store the information in an array to pull out later? or hell just upload into appropriate fields in a database...wow...you could turn this into something fun.... :: stops himself:: yeah...

I would make the width on the text box's just wide enough to view the text then make them disabled so that noone could type anything in the box. and then beside those text box's put more text boxes where they can fill in the appropriate data and then when processing the form combine the appropriate boxes. Or perhaps not even have a box displaying the data you are requesting but rather go..
requierd info 1: (text box)
required info 2: (text box)
etc. : (text box)

and then when processing assigning the appropriate labels to the appropariate text box. That's why you can name fields. :-D

And the rest was ranting...
better?:-D

Posted: Mon Oct 24, 2005 8:36 pm
by dallasx

Code: Select all

echo "<input type=\"text\" name=\"textfield\" value=\"Hehehe\" disabled>";
I think it only works with IE4.0+

Posted: Mon Oct 24, 2005 8:59 pm
by mickd
http://www.w3schools.com/xhtml/xhtml_syntax.asp

This is wrong:
<input disabled>

This is correct:
<input disabled="disabled" />

not that big of a deal but you should get used to using XHTML standards.

Posted: Mon Oct 24, 2005 9:06 pm
by John Cartwright
Moved to Client-Side. :roll:

Posted: Tue Oct 25, 2005 12:39 pm
by rami
mickd wrote:http://www.w3schools.com/xhtml/xhtml_syntax.asp

This is wrong:
<input disabled>

This is correct:
<input disabled="disabled" />

not that big of a deal but you should get used to using XHTML standards.
Mind you the user should be able to add text to it...what they cannot do is delete the existing data displaying as initial in text area

any way i will givea try
but i have a feeling that this is totally disable input

they can add the text there but cannot del existing data
will it do
thanks

Posted: Tue Oct 25, 2005 1:18 pm
by RobertGonzalez
You can use some client-side Javascript validation to confirm that the original part of the field was untouched (maybe a comparison of what was there to begin with versus what what submitted?), or you can set up a text field that does not include the original information and append what is in the text box to the field that was never made available to begin with. That way when the information is submitted the option to change the original data is not offered.