Pre Filled Apply Now Form for Job Application

At the moment, the easiest way would be to designate one of the elements in the list as the link, and add a custom details link to that (in the List Settings of the element), using placeholders, like ...

Code:
index.php/option=com_fabrik&view=form&formid=123&application___job_title={listings___job_title}

Obviously replace the formid, and the names of the elements. You can add as many &application___whatever={listings___whatever} args you want, just match up the full element names.

To include the email, I presume that would be associated with the J! account of the person placing the listing? And that the listing list includes a user element? So best way would be to include the listing id in your application, and do &application___listing_id_raw={listings___id_raw} in the link (add the _raw, as these would be join elements). Then you can add an "Email to (eval)" in the email plugin for the application that looks up the user for that job listing ...

Code:
$listingId = '{application___listing_id_raw}';
$myDb = JFactory::getDbo();
$myQuery = $myDb->getQuery(true);
$myQuery->select('#__users.email')->from('applications')->leftJoin('#__users ON #__users.id = applications.userid')->where('applications.id = ' . $myDb->quote($listingId));
$myDb->setQuery($myQuery);
return $myDb->loadResult();

Obviously change the table and field name for 'applications' and 'userid'.

-- hugh
 
Oh, forgot to say ...

I've had several people ask for "buttons" to link to other pages, so I'm in the process of building a "link" list plugin, that lets you build a link and include it as a button in the list buttons part of the row, rather than using an element as a link.

-- hugh
 
Hi Hugh...Indeed job listing list has user element. Email is not joomla email but a part of job listing list by way of an email field....
 
OK, well just tweak that query to just get the email from the listing row directly, no need to joint he #__users table ...

Code:
$myQuery->select('email')->from('listings')->where('listings.id = ' . $myDb->quote($listingId));

-- hugh
 
Cool...I will give it a shot...I successfully added a custom link and fields are auto populated without issues. For the email issue, apart from the solution which you suggested (emal - eval) can i use simple email field of auto populated email address from another list with placeholder ?
 
You could, but I'd recommend passing in the listing id and storing that in the application, as that's just something you should do anyway (allows you to do things like find all applications for a given listing). And once you have that, it's trivial to get the email through the eval.

Sent from my HTC 10 using Tapatalk
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top