This topic is locked

Tooltips in Add module

8/7/2007 6:36:48 AM
PHPRunner General questions
J
Jean author

Sorry, forget this, I found the solution at smartytohtml
------------

In the _add.htm (phpr 3.1), I find
<TD width=345> {build_edit_control field="ref" mode="add" value=$value_ref}
...
I would like to run a routine after the INPUT, which would be in html code:
<input type="text" id="ref" onkeyup="tooltip(this);">
I don't understand how to convert the htlm code in the Smarty way. Can anybody help me?
Thanx in advance.

J
Jane 8/7/2007

Jean,
you can add your onkeyup event editing generated include/commonfunctions.php file.

Fine following code snippet and edit highlighted line:

if($format==EDIT_FORMAT_TEXT_FIELD)

{

if(IsDateFieldType($type))

echo '<input type="hidden" name="'.$ctype.'" value="date'.EDIT_DATE_SIMPLE.'">'.GetDateEdit($field,$value,0,$secondfield,$edit);

else

{

if($edit==MODE_SEARCH)

echo '<input type="text" autocomplete="off" name="'.$cfield.'" '.GetEditParams($field).' value="'.htmlspecialchars($value).'">';

else

echo '<input type="text" name="'.$cfield.'" '.GetEditParams($field).' value="'.htmlspecialchars($value).'">';

}

}