Quantcast

Readonly field

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Readonly field

Stephen Speakman
Hi

I want to set an input box to be readonly, this is to prevent users from editing the field, the data needs to be posted so disabled is not an option.

I know I can do this with Javascript, but I am wondering how come there doesn't seem to be a readonly parameter?

--
Kind Regards
 Stephen

 http://www.ninjacodermonkey.co.uk


--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Readonly field

AD7six


On Mar 11, 9:54 am, Stephen <[hidden email]> wrote:
> Hi
>
> I want to set an input box to be readonly, this is to prevent users from
> editing the field, the data needs to be posted so disabled is not an option.
>
> I know I can do this with Javascript, but I am wondering how come there
> doesn't seem to be a readonly parameter?

what's the difference between read-only and hidden? Or what's the
difference between showing the user a disabled input and submitting a
hidden input.

However: Why are you sending a field to the user which they can't edit
(instead of storing whatever the value is in the session, for
example,) but are apparently wanting to use the value of - It sounds
like you're about to make a big mistake: trusting user input instead
of simply not including it in the form.

AD

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Readonly field

AD7six


On Mar 11, 12:44 pm, AD7six <[hidden email]> wrote:
> On Mar 11, 9:54 am, Stephen <[hidden email]> wrote:
>
> > Hi
>
> > I want to set an input box to be readonly, this is to prevent users from
> > editing the field, the data needs to be posted so disabled is not an option.

ps readonly is simply another attribute - i.e. you just add it if that
really is what you want.

AD

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Readonly field

Zaky Katalan-Ezra
In reply to this post by Stephen Speakman

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Readonly field

Stephen Speakman
In reply to this post by AD7six
Hi

I made a mistake in thinking read only works with <select>, I assumed my issue was CakePHP rather than general HTML.

The disabling of fields is only a temporary "blocker" to prevent users triggering a bug I am trying to fix - this bug breaks whole orders on import, I will remove the "blocker" when the bug is fixed and uploaded.

The functionality of the action is still active and it still serves its purpose, it just limits advanced features (User can still achieve the same results through other actions)


On 11 March 2011 11:46, AD7six <[hidden email]> wrote:


On Mar 11, 12:44 pm, AD7six <[hidden email]> wrote:
> On Mar 11, 9:54 am, Stephen <[hidden email]> wrote:
>
> > Hi
>
> > I want to set an input box to be readonly, this is to prevent users from
> > editing the field, the data needs to be posted so disabled is not an option.

ps readonly is simply another attribute - i.e. you just add it if that
really is what you want.

AD

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php



--
Kind Regards
 Stephen

 http://www.ninjacodermonkey.co.uk


--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Readonly field

euromark (munich)
In reply to this post by AD7six
http://www.dereuromark.de/2010/06/23/working-with-forms/

paragraph
"Default Values – hidden!" or "Disallowing some fields to be edited"

cheers
mark


so simply pass the record along to the view and echo it (without any
form)


On 11 Mrz., 12:46, AD7six <[hidden email]> wrote:

> On Mar 11, 12:44 pm, AD7six <[hidden email]> wrote:
>
> > On Mar 11, 9:54 am, Stephen <[hidden email]> wrote:
>
> > > Hi
>
> > > I want to set an input box to be readonly, this is to prevent users from
> > > editing the field, the data needs to be posted so disabled is not an option.
>
> ps readonly is simply another attribute - i.e. you just add it if that
> really is what you want.
>
> AD

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Readonly field

Krissy Masters
Hidden or disabled means nothing if the user is smart. Firebug will allow
you to edit hidden or disabled values changing them to whatever they want.
You still need to validate everything as nothing is to be trusted coming
from the user.

K


--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Readonly field

Stephen Speakman
Hi Krissy

Enabling the fields doesn't cause a problem for us - it seemed better to enable the basic functionality of "duplicate" rather than remove it all together.

The duplicate functionality allows you to change absolutely everything so you can duplicate say for example a Green Pepper and if desired turn it into a Lean Steak with Peppercorn Sauce and Chunky Chips (example). Now they can only duplicate a Vegetable to create another Vegetable i.e. Green Pepper to Red Pepper.

Weird example, the products are not food items ;)

Full functionality will be restored when the bug is fixed, tested and approved.

HTH explain.

--
Kind Regards
 Stephen

 http://www.ninjacodermonkey.co.uk


--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Loading...