This topic is locked

Protect fields on Edit Form

3/16/2007 12:11:54 AM
PHPRunner General questions
D
dckamo author

Hi,
I have 2 forms, an add form and an Edit form. I would like to protect some fields on an edit form and have them open for input on an add form. How can I accomplish this?
Regards

Kes

E
evan_ad2000 3/16/2007

Hi,

I have 2 forms, an add form and an Edit form. I would like to protect some fields on an edit form and have them open for input on an add form. How can I accomplish this?
Regards

Kes


I'm using 3.1 and I think this should help. Go to step 6 of 12, it should be the step where you can choose the fields you want to show in the tables. Uncheck the ones that you want to protect under the Edit column. That should work. Good Luck!

G
gdude66 3/16/2007

The other option is go to the edit form in visual and make those fields read only.

D
dckamo author 3/16/2007

Thanks Graeme for your reply!

  1. When I uncheck a field in step 6, This field does not display on the edit form. I want the field displayed and the mode to be protected.
  2. If I make the field readonly under the visual attributes then this very same attribute of

    readonly is replicated to the add form. I want the field to be input on the add form.
    Any help will be greatly appreciated.
    Regards

    Kes

G
gdude66 3/16/2007

Thanks Graeme for your reply!


  1. When I uncheck a field in step 6, This field does not display on the edit form. I want the field displayed and the mode to be protected.
  2. If I make the field readonly under the visual attributes then this very same attribute of

    readonly is replicated to the add form. I want the field to be input on the add form.
    Any help will be greatly appreciated.
    Regards

    Kes



You can set different attributes on the add form. Use visual editor to change them. They can be different on different pages you need to set them separately in visual editor.

J
Jane 3/16/2007

Kes,
you can do the following:

  1. edit your SQL query on the Edit SQL query tab.

    Here is a sample:
    select Field1,

    Field1 as Field1Readonly,

    ...

    from TableName



2. check off Field1 on the Add page, Field1Readonly on the Edit page on the Choose fields tab.

3. set up Field1 as text field, Field1Readonly as readonly field on the "Edit as" settings dialog on the Visual Editor tab.

D
dckamo author 3/16/2007

Thank You Jane,
Your solution is brilliant!
Regards

Kes