diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index d0f621fd09b..6b8e3469d34 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -3561,18 +3561,20 @@ class Form
* To add a particular filter on select, you must set $object->next_prev_filter to SQL criteria.
*
* @param Object $object Object to show
- * @param int $paramid Name of parameter to use to name the id into the URL link
- * @param string $morehtml More html content to output just before the nav bar
+ * @param string $paramid Name of parameter to use to name the id into the URL link
+ * @param string $morehtml More html content to output just before the nav bar
* @param int $shownav Show Condition (navigation is shown if value is 1)
- * @param int $fieldid Nom du champ en base a utiliser pour select next et previous
- * @param string $fieldref Nom du champ objet ref (object->ref) a utiliser pour select next et previous
- * @param string $morehtmlref Code html supplementaire a afficher apres ref
- * @param string $moreparam More param to add in nav link url.
- * @return tring Portion HTML avec ref + boutons nav
+ * @param string $fieldid Nom du champ en base a utiliser pour select next et previous
+ * @param string $fieldref Nom du champ objet ref (object->ref) a utiliser pour select next et previous
+ * @param string $morehtmlref Code html supplementaire a afficher apres ref
+ * @param string $moreparam More param to add in nav link url.
+ * @return tring Portion HTML avec ref + boutons nav
*/
function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='')
{
$ret='';
+ if (empty($fieldid)) $fieldid='rowid';
+ if (empty($fieldref)) $fieldref='ref';
//print "paramid=$paramid,morehtml=$morehtml,shownav=$shownav,$fieldid,$fieldref,$morehtmlref,$moreparam";
$object->load_previous_next_ref((isset($object->next_prev_filter)?$object->next_prev_filter:''),$fieldid);