3

I'm looking for some suggestions for the best way to layout an employment history field in a safecracker form. The paper version has a table with the following headers:

  • From – To (month/year)
  • Job Title
  • Name, Address & Telephone Number of Employer
  • Reason for leaving

I don't want to create multiple fields for each possible job in the list so I was thinking of going for a single textarea.

Can anyone suggest a nicer way of doing this? Thanks.

3 Answers 3

4

Consider using the Matrix field_type by Pixel & Tonic, see Pixel & Tonic: Matrix This will allow you, the applicant to enter as many rows of like formatted data as needed.

You would define the areas, similar to a table. So the subfields could be: from (mm/yyyy), to (mm/yyyy), position, company, summary, reason for leaving.

The info could be laid out how you like, say something like:

  **From       To         Position/Company**
  **Summary/Reason for Leaving**

  05/2012   09/2012     Web Developer, Prince and Stadtler
  Summary: Worked developing photo exhibit section for project specific to user feedback stories.
  Reason for Leaving: Contract Ended
  ...

  01/2012   04/2012     Database Developer, Synchronized Beings
  Summary: Switched company from MySQL to MongoDB.
  Reason for Leaving: Contract Ended

The form would place a single instance of the fields to be completed. The applicant, would then select to add more rows, as needed, similar to adding jobs or projects to LinkedIn.

Matrix works well for these types of situations, where there would be an unknown amount of, but similarly formatted responses. It could also be used for a skills field, etc.

4
  • Great, thank you! My only concern is that matrix can be a bit sticky with safecracker and EE 2.5.3
    – user579984
    Commented Dec 3, 2012 at 12:54
  • If Matrix is out, then, I'd say you want a related database (really a related channel). Create a new channel, with the fields you want, also add a field for related record number, maybe member_id, application_title (person's name). Your application would then be complete in sections, w/ ajax, this could still be a single page. But grab initial record-- name, address, contact details first. Grab the member_id, entry_id, and other variables from that. Then pass them as hidden input fields for each entry in the work_history channel. Commented Dec 3, 2012 at 13:25
  • Im using matrix for just this issue and it works beautifully (is there a reason why you can't upgrade to latest version of EE?)
    – user579984
    Commented Jan 24, 2013 at 10:12
  • Nope, it's fixed now, I believe. In EE 2.5.3 or 2.5.4 Ellis Lab modified ExpressionEngine with some new security fixes, that removed the ip_address. A numer of modules and accessories, were temporarily broken. So the recommendation was just to hold off updating until third party developers made adjustments to their software, so your site didn't break. But almost everything we use has been updated. So you should be fine. The modifications to EE2 happened in early December, so that should have been plenty of time for updates. Commented Jan 24, 2013 at 11:26
1

The cleanest solution i can think of is to use Matrix from Pixel and Tonic.

Create a matrix field with a field for each of your columns and then use {field:your_matrix_field_name} in your SafeCracker form.

0

You could use WYGWAM and the templates feature of CKEditor. Each From/To section would be a template segment. Training users on what to click and choose might be a little tricky but it would certainly work for your situation and keep things to one field.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.