This topic is locked

ReadOnly to editable for just a moment

10/7/2006 8:37:59 PM
PHPRunner General questions
J
Jean author

Hello,

I put a field in ReadOnly mode via the Visual Editor. I need to make it editable in some specific circumstances. It means making it editable just a moment before it become ReadOnly again. Why? I would like to use the Copy function with the ability to modify just during this specific process a field that was defined as ReadOnly via the Visual Editor.

Can anybody help me to find a way in the source to do what I failed to ? <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=3554&image=1&table=forumtopics' class='bbcemoticon' alt='<<' />

Thanx in advance for any idea.

Jean

J
Jane 10/9/2006

Jean,
you can do the following:

  1. edit you sql query on the Edit SQL query tab.

    Here is a sample:
    select `field1`,

    `field2`,

    `field2` as `newfield2`,

    ...

    from `Tablename`



2. set newfield2 field to Readonly.

3. show field2 or newfield2 on the EDIT page depending on your condition.

J
Jean author 10/14/2006

Thank you, Jane. Trying this strategy I meet an error message :
<<< Record was NOT added >>> Unknown column 'clone_email' in 'field list'
I use the Copy option in the _list module. In the Copy/Add page, I would like to be able to change a Readonly field. Your strategy gives me the ability to edit the initial Readonly field in the form but I meet this error message when saving <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=11824&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' /> What's wrong ?

J
Jane 10/16/2006

Jean,
did you uncheck readonly clone_email field from all pages except EDIT page on the Choose fields tab (step 6) in the PHPRunner?

J
Jean author 10/16/2006

I didn't <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=11862&image=1&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' />
It functions very well, thank you Jane !