This topic is locked

Same Field, Different Settings

5/6/2009 11:29:13 AM
PHPRunner General questions
lewisgr author

Hello again,
On the add page I want the Unique ID field to be a lookup.
On the edit page I want to Unique ID to show and be read-only.
I haven't seen a way to break these apart so the changes don't happen on both pages.

lewisgr author 5/6/2009

So is this a weird one? <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=40871&image=1&table=forumreplies' class='bbc_emoticon' alt=':lol:' />

Sergey Kornilov admin 5/6/2009

The simplest way - you can use some Javascript to make this dropdown box disabled on the Edit.
More advanced technique involves hiding the dropdown box completely and displaying the textual value of this field. Javascript coding skills are required in both cases.

J
Jane 5/7/2009

Hi,
you can create alias for this field on the Edit SQL query tab:

select field1,

field1 as field1_readonly,

...

from TableName



And set up different settings for field1 and field1_readonly fields on the Visual Editor tab.

lewisgr author 5/7/2009

Jane,
That's quick and simple! I love it!
Thanks

O
OLDmrcaseyman 5/7/2009

Hello again,

On the add page I want the Unique ID field to be a lookup.
On the edit page I want to Unique ID to show and be read-only.
I haven't seen a way to break these apart so the changes don't happen on both pages.


How about if in your query page you create a virtual field such as:
Unique_ID AS Unique_ID_View
Then on the Fields Tab in the Edit column uncheck Unique_ID and check Unique_ID_View

You can then Make Unique_ID_View as "read-only"