jobs.php

8 replies · opened May 21, 2016

RReitierMay 21, 2016

Hello, in include\jobs.php as I can choose what types of files can upload?

if ( isset( $_FILES['template-jobform-cvfile'] ) && $_FILES['template-jobform-cvfile']['error'] == UPLOAD_ERR_OK ) {
$mail->IsHTML(true);
$mail->AddAttachment( $_FILES['template-jobform-cvfile']['tmp_name'], $_FILES['template-jobform-cvfile']['name'] );
}

Thank you kindly!!

SSemicolon WebSTAFFMay 24, 2016

Hello,

Thank for your Patience.

We have just checked out your Website remotely and it appears to be working fine but you are using the Older Version of the PHP Files that processes the Forms. But we have upgraded the way we handle Form Responses in the Latest Version of Canvas. Please use the Latest Version of the PHP Files and also simply change the action="include/jobs-file.php" to action="include/jobs.php" in the <form> Tag since the include/jobs.php File will handle this Form just fine.

Additionally, we have also noticed that you have added some Inline JS in the middle of the Page which is not recommended as in the Latest Versions of Canvas you are required to move all the Inline JS Codes at the bottom of the Page just after the js/functions.js JS File Linking. Also, the Contact Form's Inline JS Code is not required since it is already being handled by the js/functions.js File. Please make sure that you have properly followed the Upgradation Instructions provided in the Documentation > Upgrade v3.x to v4.0 Section.

This will definitely work fine. Let us know if we can help you with anything else or if you find any further issues.

RReitierMay 24, 2016

Thanks for your reply.
I followed the steps you indicate me:

1.- I changed the link action=”include/jobs-file.php” to action=”include/jobs.php”
2.- Removed the script after form
3.- Updated all PHP
4.- Changed JS after the js/functions.js

The form sends good messages, but it still does not display the message.
On the other hand, if captcha is not noted, it shows the error message, but clean all form fields.
Thank you very much for your help!!

SSemicolon WebSTAFFMay 25, 2016

Hello,

We Really Apologize about the issue as there seems to be a Bug with the incldue/jobs.php File. Please use the Updated File: https://www.dropbox.com/s/iv1e32631zrxzqi/jobs.php?dl=1 as this should definitely fix your issue with the Message Notifications. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

RReitierMay 25, 2016

Hello,
Thank you very much for your help!!
All perfect...

Only two last questions

  • It is possible to maintain the form fields when the user makes an error in recaptcha?
  • I put class="sm-form-control required" in id ="template-jobform-cvfile", but is not indicated as required.

http://www.bsstaff.com/job/

Thanks for your support...

SSemicolon WebSTAFFMay 27, 2016

Hello,

  1. This is Definitely Possible. Please find the contactForm: function() Function Block in the js/functions.js File and replace the Entire Block with the following code:
contactForm: function(){

	if( !$().validate ) {
		console.log('contactForm: Form Validate not Defined.');
		return true;
	}

	if( !$().ajaxSubmit ) {
		console.log('contactForm: jQuery Form not Defined.');
		return true;
	}

	var $contactForm = $('.contact-widget:not(.customjs)');
	if( $contactForm.length ');
				} else {
					$(form).find('.form-process').fadeIn();
				}

				$(form).ajaxSubmit({
					target: elementResult,
					dataType: 'json',
					success: function( data ) {
						if( elementLoader == 'button' ) {
							defButton.html( defButtonText );
						} else {
							$(form).find('.form-process').fadeOut();
						}
						if( data.alert != 'error' && elementRedirect ){
							window.location.replace( elementRedirect );
							return true;
						}
						if( elementAlert == 'inline' ) {
							if( data.alert == 'error' ) {
								var alertType = 'alert-danger';
							} else {
								var alertType = 'alert-success';
							}

							elementResult.addClass( 'alert ' + alertType ).html( data.message ).slideDown( 400 );
						} else {
							elementResult.attr( 'data-notify-type', data.alert ).attr( 'data-notify-msg', data.message ).html('');
							SEMICOLON.widget.notifications( elementResult );
						}
						if( $(form).find('.g-recaptcha').children('div').length > 0 ) { grecaptcha.reset(); }
						if( data.alert != 'error' ) { $(form).clearForm(); }
					}
				});
			}
		});

	});
}
  1. Currently custom Upload Fields is not compatible with the jQuery Validation Plugin. We are definitely working on this and will make this compatible in the Future Updates. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

RReitierMay 29, 2016

Replace this code, generates some conflict.
If I apply, the pages do not load.

Thank you

SSemicolon WebSTAFFMay 29, 2016

Hello,

Please make sure that the Commas (,) are intact between the Function Blocks in the js/functions.js File. This seems to be the most likely issue here.

Do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard