This topic is locked

Problem with the mandatory signature in Signature

10/23/2024 10:40:49 AM
PHPRunner General questions
A
alfonso authorDevClub member

If I activate the mandatory signature, there is no problem when we add a record. The problem I have is that when we edit that same record, even though it has a signature, it tells me that this field is mandatory and I have to edit or add anything to the existing signature. Any ideas?

// set it to true to make signature field required
$this->settings["required"]=true;

fhumanes 10/24/2024

Hi @alfonso,

You have to keep in mind that in this field it is a plugin that is facilitating the entry of information and works as you have described.

If you want the entrance to be mandatory in Edit, you must put different parameters for ADD and EDIT pages.

Greetings,
fernando

A
alfonso authorDevClub member 10/25/2024

Gracias Fernando. El problema es que al añadir, se firma. OK. Pero al editar el registro para cambiar otros datos, me dice que la firma es obligatoria, pero el caso es que la firma ya existe
img alt

A
alfonso authorDevClub member 10/25/2024

// signature field width
$this->settings["width"] = 300;
// signature background color
$this->settings["bgcolor"] = "#ffffff";
// set it to true to make signature field required
$this->settings["required"]=true;
// folder to store signature files
$this->settings["folder"]="files";
// signature background image
// $this->settings["bgimage"] = "https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=99613&image=1&table=forumreplies";
$this->settings["bgimage"] = "";
// signature pen color
$this->settings["color"] = "#145394";
// signature line width
$this->settings["linewidth"] = 2;
// save empty image
$this->settings["saveEmptyImage"] = false;
// set "db" to save image to db (field type: blob), otherwise to file (field type: varchar(500))
$this->settings["target"] = "";
// "clear" link color, black by default
$this->settings["clearcolor"] = "";

fhumanes 10/26/2024

Hola,

No sé qué es lo que deseas hacer con ese campo, supongo que lo que deseas es mostrarle.

Si es así, el contenido es una imagen, normalmente con formato PNG, por lo que puedes indicar en PHPRunner que se muestre como imagen.

Te quedaría algo así como este ejemplo:

img alt

En la página EDIT, sólo tendrías que indicarle que es "readonly".

Saludos,
fernando