×

Notice

The forum is in read only mode.

First Name, Middle Name and Last Name

15 years 7 months ago #370 by Martin Dave
Hello,

I have a quite unique situation with the form for applying jobs and submitting resume. the form displays first_name, middle_name and last_name fields, for my situation, I need to get rid of the middle name and last name fields, only use first name, it seems to be fine when I commented out the middle name field, however, if I commented out the last_name field, and also commented out the javascript that checks against last_name field being empty, I am getting error message saying I did not filling required fields, in this case, the last_name field. At first, I thought it must be a database error, because last_name is not nullable in the database, so I modified the last_name column in the database to make it a varchar(60) null, but I am still getting the same error message. I looked into the jos_jobs.php in the model folder, and still could not figure out what else code is checking last_name field.

Could you kindly give me some pointer as to what code I should look into to resolve this issue?

thanks very much for your help

Martin
15 years 7 months ago #372 by Ahmad
It is not recommended to remove last name. Last name use lot of area in the code.

In this error, you need to change table class.
\\administrator\\components\\com_jsjobs\\tables\\empapp.php

v1.0.4.1 available for testing.

Please write your valuable review JS Jobs and JS Support Ticket at JED.
15 years 7 months ago #385 by Martin Dave
Thanks man, that fixed the issue.

thanks again for this quick response and help. I am going to write a great review about this on joomla extensions site.


Also, I have another quesiton: there is a line in \\components\\com_jsjobs\\views\\jobposting\\tmpl\\formjob.php:

//window.onLoad=dochange(\'country\',-1);
// value in first dropdown

this line seems to be able to load the country drop-down menu with a default value. it was commented out in the code. I uncommented it and placed the country id for Pakistan(for instance), 80, into the function call like the following:


window.onLoad=dochange(\'country\',80);
// value in first dropdown

however, it does not seem to work. when I load the page, the country pakistan is still not selected as the default value for the country drop down. I noticed the same code appeared in a couple of other pages..

what am I doing wrong? how can I get this to work..

i just realized maybe I should start a new thread about this since this is a totally different issue...
15 years 7 months ago #391 by Ahmad
Thanks,

To select default country in new job form.

/components/com_jsjobs/models/jsjobs.php

At line no. 1205. Add your country code like PK, US, etc

I add PK in this example
$this->_options[\'country\'] = JHTML::_(\'select.genericList\', $countries, \'country\',\'class=\"inputbox required\" \'.\'onChange=\"dochange(\\\'state\\\', this.value)\"\', \'value\', \'text\', \'PK\');

Please write your valuable review JS Jobs and JS Support Ticket at JED.
15 years 6 months ago #414 by Martin Dave
Thanks for your help.

changing the line indeed made PK the default value for country selection drop-down menu. However, the state is not populated as a drop-down menu with all the state names. ideally, since the country was defauted to PK, the states should appear as drop-down menu instead of input box. In order to make all the PK states appear in the drop-down menu, I have to choose the country code again, which kind of beating the purpose of having a default country selected.

what else can we change to make this work?

again, thanks for your reply. You are the best..
Time to create page: 0.443 seconds

Please publish modules in offcanvas position.