OpenCATS 0.9.4-3

Free, Open-Source Applicant Tracking System including job-board. Entirely customisable!

have you installed OpenCATS? Proud of your customizations and want to share it? Post here and wait for the praise...

Moderators: RussH, cptr13

Forum rules: Just please remember to play nicely once you walk through the door. You can disagree with us, or any other commenters in this forum, but keep your comments directed to the topic at hand - not at the commenter.
User avatar
By PersonalAgentin
#4521
I created a simple text field during the job posting and can also output it.

How can I check a field if it contains any value or a certain value?
#4526
I have created a field "Driver's license". This field contains the required driving licence class. I only want to display the content of the field if something has been entered.

*** if !<extraField-Driving Licence>=='' ***
<tr>
<td class="detailsHeader"><strong>needed licence class:</strong></td>
<td><extraField driving licence></td>
</tr>
*** endif ***

No one has an idea? Or is that not possible?
User avatar
By rob
#4531
You are going to have to put some logic in the Show.tpl files when the extra fields are displayed for each of the modules in question.
Assuming you just need to modify candidates everything you need to do is below.

So for example on the Candidates it's in modules/candidates/Show.tpl
Code: Select all
 
Orig code:
<?php for ($i = (intval(count($this->extraFieldRS))/2); $i < (count($this->extraFieldRS)); $i++): ?>
  <tr>
     <td class="vertical"><?php $this->_($this->extraFieldRS[$i]['fieldName']); ?>:</td>
     <td class="data"><?php echo($this->extraFieldRS[$i]['display']); ?></td>
  </tr>
 <?php endfor; ?>
Code: Select all
Modified code:
<?php for ($i = (intval(count($this->extraFieldRS))/2); $i < (count($this->extraFieldRS)); $i++): ?>
 <tr>
   <?php if($this->extraFieldRS[$i]['fieldName'] == "Driver's license") {  ?>
			<?php if ($this->extraFieldRS[$i]['display']){  ?>
				  <td class="vertical"><?php $this->_($this->extraFieldRS[$i]['fieldName']); ?>:</td>
				  <td class="data"><?php echo($this->extraFieldRS[$i]['display']); ?></td>
			<?php } ?>
   <?php }else{ ?>
		  <td class="vertical"><?php $this->_($this->extraFieldRS[$i]['fieldName']); ?>:</td>
		  <td class="data"><?php echo($this->extraFieldRS[$i]['display']); ?></td>
   <?php } ?>
 </tr>
<?php endfor; ?>


Note: On these Show.Tpl pages there are 2 columns displaying the fields so that means there are 2 different sections in the code that handle the extra fields. So if you change this and its not reflecting on the site, you added it to the opposing column.
Installation errors on Bluehost

I am unable to install OpenCATS on Bluehost. I am […]

custom fields

You are going to have to put some logic in the Sho[…]

Google for Jobs

Thanks for the quick answer. The jobs can be foun[…]

Admin Login Page

Failed to load resource: the server responded with[…]

http error 500

While trying to open opencats/index.php? the page […]

What host? Did you use the documentation? What i[…]

new version check

Thanks for the explanation.

ä / ü / ö in emails

Thank you. Thank you. I've inserted it. I'll get b[…]

Hi, sorry not heard of any Kubernetes deployment[…]

Candidate edit page date

Hi, we've just closed out the php 7.x feature bran[…]

For both your questions there's really a single an[…]