This topic is locked

Auto Fill Fields on Click

11/1/2007 2:17:32 PM
PHPRunner General questions
paperhog author

I would like to create a button that auto fills 4 fields with default information if the users chooses, but I do not want to set those fields as defaults values as I fear to many are to lazy to change one field or the other and this is an all or none prefill.
Anyone have any ideas?
TIA

J
Jane 11/2/2007

Lori,
you can do it using custom event on the add/edit pages on the Visual Editor tab (Insert PHP code snippet option).

Here is a sample:

echo "<input class=button type=button value=\"&nbsp;&nbsp;Fill&nbsp;&nbsp;\" onclick=\"document.editform.value_FieldName1.value='test';document.editform.value_FieldName2.value='test';\">";