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.

Hi everyone. I am hoping to do some updating to t[…]

I have added sorting by whether a Contact is Hot o[…]

Bulk Emails

Thanks, however, I’ve now successfully imple[…]

Email Integration

sending emails from opencats I've funded a ver[…]

opencats current release does not support PHP 7.x,[…]

Sorry - I've replied to a separate thread on this.[…]

Hi I have a separate patch I had developed that l[…]

Guys, 99% of the issues I see reported are due t[…]

Hey @ormankanca , that's great news - but is it […]

MySql is not working.

Just to update and close of this thread. I did as […]

Email History

Hi Russ, It's a start! Please find instruction[…]

Insert this code at line 60 of /modules/candidates[…]

With the PHPMailer option sending multiple emails […]

I've tried to get template support working (https:[…]