thx
actually I shifted the action from p4 to submit page (which is the last resort) and I dont prefer doing so.
the reason is that on p4 user finishes the form filling and uploads files then he see a confirmation page. due to db not saving name correctly and putting old name in db and the file is actually uploaded with the new name, this will create a mess between the file uploaded and the file name in db.
so what I ended up doing is showing the user the vlaues of form on p4 and below that he has the upload button then he submits and gets another screen of confirmation and the db is updated with correct name.
I couldnt get the db save overrride to work on filename. Im out of ideas to be honest can you suggest any fix?
below if the value of array on submit
Array
(
[submit_validate_fields] => Array
(
[log] => Automatic validation enabled.
[var] => 1
)
[upload6] => Array
(
[path] => /home/XXXXXX/public_html/XXXXX/components/com_chronoforms6/chronoforms/uploads/
[personal_pic] => Array
(
[extensions] => Array
(
[0] => jpg
[1] => jpeg
[2] => png
[3] => gif
[4] => pdf
)
[saved] => 1
)
[var] => Array
(
[personal_pic] => Array
(
[path] => /home/XXXXX/public_html/XXXXX/components/com_chronoforms6/chronoforms/uploads/Personal_Pic_363_admin.jpg
[filename] => Personal_Pic_363_admin.jpg
[name] => graphicstock-man-on-sofa-watching-tv-with-apple_SdI63NP3e_SB_PM.jpg
[size] => 127533
)
)
)
[save_data3] => Array
(
[data] => Array
(
[created] => 2019-12-13 12:47:53
[user_id] => 363
[personal_pic] => Personal_Pic_363_admin.jpg
[name_en] =>
[surname_en] =>
[name_ar] =>
[surname_ar] =>
[appseason] => Jan2020
[dob] => 30/12/2019
[gender] => Male
[marital_status] => Married
[mobile1] => 0999999999
[mobile2] => 08888888
[email1] => admin@XXXX
[email2] => 11@22.com
[username] => admin
[facebookpageurl] => http://www.fb.com
[otherpageurl] => http://www.tw.com
[didyouwork] =>
[county] => Ba
[city] =>
[area] =>
[text47] =>
[streetname] =>
[houseno] =>
[nearestpoi] =>
[ip_address] => 88.XX.XX.XX
[dateofapp] => 2019-12-13 12:46:20
[currentdegree] => BSc
[currentgraduni] => Bag
[currentgradfaculty] => Law
[currentgraddept] =>
[currentgradyr] => 2019
[currentgpa] => 00.99
[ref1name] =>
[ref1job] =>
[ref1contactno] =>
[ref2name] =>
[ref2job] =>
[ref2contactno] =>
[countrytoapply] =>
[placeofappointment] => Tu
[applytodegree] =>
[q1_1] =>
[q1_2] =>
[q1_3] =>
[q1_4] =>
[q1_5] =>
[q2_1] =>
[q2_2] =>
[q2_3] =>
[q2_4] =>
[q3_1] =>
[q3_2] =>
[q3_3] =>
[q4_1] =>
[q5_1] =>
[q5_2] =>
[q6_1] =>
[q7_1] =>
[q8_1] =>
[q9_1] =>
[q10_1] =>
[passport_file] =>
[iraqi_national_id_face] =>
[iraqi_national_id_back] =>
[grad_cert_en] =>
[grad_cert_official] =>
[recommendation_letter] =>
[essay_letter] =>
[cv_ar] =>
[cv_en] =>
[residence_card] =>
[proof_of_address] =>
)
[_success] => Data saved successfully
[log] => Array
(
[0] => INSERT INTO `jos43_chronoforms_data_XXXX` (`created`, `user_id`, `personal_pic`, `name_en`, `surname_en`, `name_ar`, `surname_ar`, `appseason`, `dob`, `gender`, `marital_status`, `mobile1`, `mobile2`, `email1`, `email2`, `username`, `facebookpageurl`, `otherpageurl`, `didyouwork`, `county`, `city`, `area`, `text47`, `streetname`, `houseno`, `nearestpoi`, `ip_address`, `dateofapp`, `currentdegree`, `currentgraduni`, `currentgradfaculty`, `currentgraddept`, `currentgradyr`, `currentgpa`, `ref1name`, `ref1job`, `ref1contactno`, `ref2name`, `ref2job`, `ref2contactno`, `countrytoapply`, `placeofappointment`, `applytodegree`, `q1_1`, `q1_2`, `q1_3`, `q1_4`, `q1_5`, `q2_1`, `q2_2`, `q2_3`, `q2_4`, `q3_1`, `q3_2`, `q3_3`, `q4_1`, `q5_1`, `q5_2`, `q6_1`, `q7_1`, `q8_1`, `q9_1`, `q10_1`, `passport_file`, `iraqi_national_id_face`, `iraqi_national_id_back`, `grad_cert_en`, `grad_cert_official`, `recommendation_letter`, `essay_letter`, `cv_ar`, `cv_en`, `residence_card`, `proof_of_address`) values ('2019-12-13 12:47:53', '363', 'Personal_Pic_363_admin.jpg', '', '', '', '', 'Jan2020', '30/12/2019', 'Male', 'Married', '0999999999', '08888888', 'admin@XXX', '11@22.com', 'admin', 'http://www.fb.com', 'http://www.tw.com', '', 'Bag', '', '', '', '', '', '', '88.247.x.x', '2019-12-13 12:46:20', 'BSc', 'Bag', 'Law', '', '2019', '00.99', '', '', '', '', '', '', '', 'Tur', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
)