Autocomplete giving me an undefined as default

QuestionsAutocomplete giving me an undefined as default
Tim Moore asked 2 years ago

I have an inline add, and after switching to php8 I get an undefined in the grid. I have to delete it before i can start typing. please help.

View post on imgur.com

Thanks,

Tim

 

4 Answers
Abu Ghufran Staff answered 2 years ago

Hello,

I’m unable to regenerate the issue with php8.1 and demo inside /editing/inline-add.php.
Can you verify if it’s working on your environment?

You can share code for review.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Tim Moore answered 2 years ago

$col = array();
$col[“title”] = “Job Number”;
$col[“name”] = “job_number_tc”;
//$col[“link”] = “unit_list.php?job={time_job_id}”;
$col[“width”] = “100”;
$col[“hidden”] = false;
$col[“editable”] = true;
$col[“formatter”] = “autocomplete”;
$col[“editoptions”][“autocomplete”] = “off”;
$col[“search”] = false;
$col[“formatoptions”] = array(“sql”=>”SELECT *, CONCAT(job_number_tc,’ – ‘, job_description) as v, job_id as k FROM tbl_job WHERE job_status <> ‘ARCHIVED'”,
“search_on”=>”job_number_tc”,
“callback”=>”fill_form”);
$cols[] = $col;

seems to be ab issue with an undefined link. When i REM that out i no longer get undefined.

Abu Ghufran Staff answered 2 years ago

Instead of “link”, Please try using template (or default) property:

$col["template"] = "<a href='unit_list.php?job={time_job_id}'>{job_number_tc}</a>";
_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Tim Moore answered 2 years ago

This worked perfectly.

Thanks

Tim

Your Answer

7 + 8 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?