This topic is locked

Disable editing in one only field....?

6/3/2008 7:36:39 AM
ASPRunnerPro General questions
S
stalbone author

Hi

Is it possible disable editing in one only field if this field is not empty ? (after it was added with a value...)
Many thanks
Stefano

C
Codea 6/3/2008

Hi

Is it possible disable editing in one only field if this field is not empty ? (after it was added with a value...)
Many thanks
Stefano


Hi Stefano,

Have you tried in Visual Editor? Select the field, right click your mouse and go to properties. Select the "Edit as" tab and choose the "Readonly" in the options window. Bare in mind I am using ASPRunner 5.2 (build 412). Hope this Helps.

Cheers

Tony <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=29939&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />

J
Jane 6/4/2008

Stefano,
set up this field as readonly on the "Edit as" settings dialog on the Visual Editor tab.
If you want to set up one field as text box on the add page and as readonly value on the edit page edit your SQL query on the Edit SQL query tab.

Here is a sample:

select field1,

field1 as field1_edit,

...

from TableName



And set up different "edit as" format for these fields on the Visual Editor tab.

S
stalbone author 6/4/2008

Thanks Tony & Jane.
Ok for the suggestion but I intended another thing.

I have a field, in a list of fields, that, if it filled and saved, editabiles (only him however) it must not be more....
Is it impossible... ? :-)
Stefano

J
Jane 6/5/2008

Stefano,
it's very hard to understand you.

Please re-phrase your question.

S
stalbone author 6/5/2008

Stefano,

it's very hard to understand you.

Please re-phrase your question.


Excuse my English... :-(
I have a table with:
Field1 = DateOfWork

Field2 = TypeOfWork

Field3 = FeedBackWork
The fields of my record are empty or null
Step 1: I edit this record and I insert value in Field1,Field2 and Field3

Step 2: I save record

Step 3: I again edit my table (my records)
Now, I edit next this record and now

I would want the only Field2 to be _not editabile_because it is not null..
All this dynamically and not built through the Visual Editor... Because the change of the state of the record is dynamic...
I hope to have explained well the concept...

Thanks to everybody
Stefano

S
stalbone author 6/10/2008



Excuse my English... :-(
I have a table with:
Field1 = DateOfWork

Field2 = TypeOfWork

Field3 = FeedBackWork
The fields of my record are empty or null
Step 1: I edit this record and I insert value in Field1,Field2 and Field3

Step 2: I save record

Step 3: I again edit my table (my records)
Now, I edit next this record and now

I would want the only Field2 to be _not editabile_because it is not null..
All this dynamically and not built through the Visual Editor... Because the change of the state of the record is dynamic...
I hope to have explained well the concept...

Thanks to everybody
Stefano


Any ideas on how to ? :-(

Thanks

Stefano

J
Jane 6/18/2008

Hi,
use JavaScript code for this purpose.

Here is a sample:

<script>

if(document.forms.editform.value_FieldName.value!=''')

document.forms.editform.value_FieldName.disabled=true;

</script>