Dear all,
I have a problem with save multiple data, I have two tables that have relations with id_permohonan.
1. tbl_t_permohonan
2. tbl_t_file_upload
I already success to save link of multiple upload, but it's not save id_permohonan as relation.
this is custom code after upload
That custom code only save link of file upload to tbl_t_file_upload. How to save id_permohonan to tbl_t_file_upload?
I have a problem with save multiple data, I have two tables that have relations with id_permohonan.
1. tbl_t_permohonan
2. tbl_t_file_upload
I already success to save link of multiple upload, but it's not save id_permohonan as relation.
this is custom code after upload
<?php
if ($form->data["nama_file1"] !=""){
$form->data["namalist"]["0"]["nama_file"] = $form->files["nama_file1"]["link"];
}
if($form->data["nama_file2"] !=""){
$form->data["namalist"]["1"]["nama_file"] = $form->files["nama_file2"]["link"];
}
?>
That custom code only save link of file upload to tbl_t_file_upload. How to save id_permohonan to tbl_t_file_upload?
Hello Yudhizth,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
What decides if clientside validation is enabled?
How is client-side JavaScript validation enabled?
Handling serverside validation errors . . .
How can set client-side validation options?
How can I add Auto Serverside Validation?
How do I use Custom Serverside validation?
How can I add Auto Client side validation?
How can I add a Custom Client side validation?
How can I run Auto and Custom Serverside Validation together?
P.S: I'm just an automated service😉
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
What decides if clientside validation is enabled?
How is client-side JavaScript validation enabled?
Handling serverside validation errors . . .
How can set client-side validation options?
How can I add Auto Serverside Validation?
How do I use Custom Serverside validation?
How can I add Auto Client side validation?
How can I add a Custom Client side validation?
How can I run Auto and Custom Serverside Validation together?
P.S: I'm just an automated service😉
Hi Yudhizth,
Do you have id_permohonan in the $form->data[''] array?
If so then you need something like:
Bob
Do you have id_permohonan in the $form->data[''] array?
If so then you need something like:
<?php
if ( $form->data["nama_file1"] != "" ){
$form->data["namalist"]["0"]["nama_file"] = $form->files["nama_file1"]["link"];
$form->data["namalist"]["0"]["id_permohonan"] = $form->data['id_permohonan'];
}
if ( $form->data["nama_file2"] != "" ){
$form->data["namalist"]["1"]["nama_file"] = $form->files["nama_file2"]["link"];
$form->data["namalist"]["1"]["id_permohonan"] = $form->data['id_permohonan'];
}
?>
Bob
This topic is locked and no more replies can be posted.