This topic is locked

Inserting Static text into an edit form field

5/12/2008 5:47:27 PM
ASPRunnerPro General questions
jadach authorDevClub member

From my list page the user clicks edit. I would like 2 fields in that edit form to be something other than what's actually in the database (static text or empty).
For example, upon edit, the field for ItemName would be empty and ready to accept new data.
Thanks
Love this product!!

J
Jane 5/13/2008

Hi,
I'm not sure that I understand you correctly.

If you don't want to allow users to edit field set up this field as readonly on the "Edit as" settings dialog on the Visual Editor tab. Add default value if needed on the same dialog.

jadach authorDevClub member 5/13/2008

I'm using the edit page to be more of an input (add page) than anything else.
Users go to List and see a list of inventory items. Specific quantities from these items will be dispensed. There are 75 items in this inventory (one record per item).
When the user clicks edit, it allows them to enter/edit a total they dispensed. Before the form is submitted, it calculates a new total from what they enter and inserts the record in another table I use as the Audit Trail.
So records are never added to the main table, they are just edited. Obviously when you open the edit form it has data from that record already populated. Currently the user has to enter data in the 2 fields but there is already data there. That's why I would like it to be empty or have a 0 in the fields when the edit form is called.

Hi,

I'm not sure that I understand you correctly.

If you don't want to allow users to edit field set up this field as readonly on the "Edit as" settings dialog on the Visual Editor tab. Add default value if needed on the same dialog.

J
Jane 5/14/2008

Hi,
I see what you're saying.

Use Edit page: Before display event on the Events tab for this purpose.

Here is a sample code:

smarty("value_FieldName1") = ""

smarty("value_FieldName2") = 0

jadach authorDevClub member 5/16/2008

Thank you Jane.

Hi,

I see what you're saying.

Use Edit page: Before display event on the Events tab for this purpose.

Here is a sample code: