Custom field data disappear on form submit

LATEST Official version.
Questions and discussions - NO ISSUES
FOR ISSUES => http://mantis.testlink.org

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
annheln
TestLink user
Posts: 3
Joined: Sat Mar 09, 2019 11:28 am
Location: Sweden

Custom field data disappear on form submit

Post by annheln »

(Version 1.9.18)
(PHP version: 7.3.2)
(Windows 10)
(Server version: 10.1.38-MariaDB)

Hello! Please see picture below for reference.

I have a few custom fields. My problem is that after I press to set the status of the test (press circled smileys), the data in these fields are cleared. I would like for the data to stay. I'm aware that it all functions as a form and that normally one can with PHP set the value-attribute of the form to echo the variable values, as per example:

Code: Select all

<input type="text" placeholder="Name" id="name" name="name" value="<?php if (isset($_POST['name'])) echo $_POST['name']; ?>"/>
I would like to achieve this with these custom fields without breaking good practice. How would I go about doing this? Or is there a different and better way to achieve it?

(Yes, I am new to TestLink and Smarty, I am trying to learn and all help is very appreciated.)

Image

Code: Select all

Version 1.9.18
PHP version: 7.3.2
Server version: 10.1.38-MariaDB
Windows 10
Post Reply