katmacau
Forum Replies Created
-
Thanks. Removed the link with CSS now. That covers it.
Thanks. That updates the message but it does not remove the Lost your password that is added to the end of that error message.
Thanks. I was able to search the field data to see if there was a file uploaded and are logging that. Will work on script to handle that separately as suggested.
Having the ability to auto compress / downsize image file uploads would be a great feature for Forminator file uploads in the future.
add_action( 'forminator_custom_form_submit_before_set_fields', 'forminator_custom_handle_submit_data', 10, 3 );function forminator_custom_handle_submit_data( $entry, $id, $field_data ) {
error_log( "Form $id submitted .... " ); // Loop through field data to look for file uploads foreach ($field_data as $field) { if(array_key_exists('field_type',$field)) { if($field['field_type'] == 'upload') { $file_path = "N/A"; if($field['value']['file']['file_path']) { $file_path = $field['value']['file']['file_path']; } error_log( "File path: $file_path" ); } } } }Thanks – thats been very helpful. However on looking at the field data it seems it only not the final file name after its placed in the forminator uploads folder. Eg the data shows:
[name] => upload-1
[value] => Array
(
[file] => Array
(
[name] => my-logo.png
[full_path] => my-logo.png
[type] => image/png
[tmp_name] => /tmp/phpJEuOXT
[error] => 0
[size] => 3481
)But what I will need to run my optimising script would be something like this with the folder name and file name. Eg
uploads/forminator/2313_535b1fc6ba913b04b97etc/3Vuvhbetc-my-logo.png
Is that data available?
Also, can you tell me if there is perhaps a filter that I can call after a form is submitted? I want to test hooking into a submission to see if a user submitted an image. And if they did resize that image using PHP etc.
Great. Will try that thanks.
Thanks. Does it still work if you upload to forminator folder and not the media library? And does it generate all the different wordpress images (thumbnail, medium etc). I just want the simple image they upload compressed.
Hi. I also noticed it in the wp_pas_postmeta table for forminator_form_meta items. Eg… in here:
….;s:12:”redirect-url”;s:36:”https://dev.mydomain.com.au/wp-admin/”;s:10:”submitData….
Thanks. The error is not being generated on every page. I have done some tests to see if there is a specific action that is trigger this to be added to the log but cannot pin point it.
Thanks. I looked it up and it was only in the
wp_frmt_form_entry_metatable which had saved submissions that included a file upload.I’ve just deleted the old entries now. But good for you to know where it was.
‘INSERT INTO
wp_frmt_form_entry_meta(meta_id,entry_id,meta_key,meta_value,date_created,date_updated) VALUES
(33, 3, ‘upload-1’, ‘a:1:{s:4:\”file\”;a:5:{s:7:\”success\”;b:1;s:9:\”file_name\”;s:33:\”qQVFX3MzhOZB-xD8100109.jpg\”;s:8:\”file_url\”;s:135:\”https://my_domain/wp-content/uploads/forminator/426_c7c28ea72fbc457656474121c4e3f114/uploads/qQVFX3MzhOZB-xD8100109.jpg\”;s:7…`Thank you for clarifying. That’s very helpful. I’ve enabled that setting now. I was confused as to why there were 2 IPs but makes sense now.
I worked it out. The lost password link was part of the description on the password field. All I had to do was manually update that link to match what the defender based login.
Hello. I tested with all plugins except Forminator and Defender de-activated. And with Twenty Twenty theme. Still same result.
The lost password link on the Forminator login form would link to “wp-login.php?action=lostpassword&redirect_to” instead of linking to “my-login?action=lostpassword” and therefore show the error message.
Thank you. I will test that out in the next couple of days and come back to you.
That’s perfect. Tested and can now submit and hide backend access.
Thanks!