Implicit value for a column when importing via CSV

QuestionsImplicit value for a column when importing via CSV
Tacitus Kilgore asked 7 months ago

Hello Abu,

I’m developing a Grid whose main purpose is to proccess data imported as CSV. That proccess is working perfectly but I need to add one more functionality:

The user will provide a CSV with the fields “Name” and “Address”, but the database has a third field “City” that has to be automatically filled with a value chosen by the user via a combobox.

So: Let’s say the user chose the City “C”, and it’s value is correctly stored in a PHP variable. Now, for that session, every row that is added with the import tool should contain ‘C’ in the City column. That column was not passed via CSV.

I hope my question is well explained, thanks in advance!

2 Answers
Tacitus Kilgore answered 7 months ago

Just to be clear: I’m wondering if I can implement that functionality directly, or how can I tweak the code of the import tool (step1-step2-step3.php) to make this work. Thanks

Abu Ghufran Staff answered 6 months ago


For this purpose we support on_import event where you can have such customizations. Line 50,53

Abu Ghufran - Dev Team
Grid 4 PHP Framework
Your Answer

0 + 4 =

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?