This topic is locked

Form object in Edit View

2/23/2009 7:58:48 PM
ASPRunnerPro General questions
S
sfkjeld author

I have a datestamp field I need users to clear in the Edit View. Rather than displaying the date field, I want to display a different form object. Maybe a checkbox. If the Checkbox is selected, then my code should null out the datestamp on Save. I see where I can display the checkbox form object, but I can't see where to interogate it's value and null out the datestamp field.
Thanks

Sergey Kornilov admin 2/23/2009

You can apply your logic in BeforeEdit event.

S
sfkjeld author 2/24/2009

You can apply your logic in BeforeEdit event.



Not sure what you mean. I want to display a Checkbox that is not bound to data. If checked, I want to clear a Date Field that is in the record show in the Edit View.
If I place a <input type="checkbox" name="mycheckbox"> in the BeforeEdit event, where do I collect the request("mycheckbox") so I can null out the date field?
thanks

Sergey Kornilov admin 2/24/2009

If you need a use a "pure" client side logic simply add checkbox code in Visual Editor in HTML mode. Sample code:

<input type="checkbox" name="mycheckbox" onclick="document.forms.editform.value_datestamp='';">