Page 2 of 2

Re: Need To Alter Candidate's Field & Input type.

Posted: 20 Sep 2017, 16:59
by cptr13
Ok got it.

Go into modules/candidates/Add.tpl

For middle name: Remove the following:
<tr>
<td class="tdVertical">
<label id="middleNameLabel" for="middleName">Middle Name:</label>
</td>
<td class="tdData">
<input type="text" tabindex="2" name="middleName" id="middleName" class="inputbox" style="width: 150px" value="<?php if(isset($this->preassignedFields['middleName'])) $this->_($this->preassignedFields['middleName']); ?>" />
</td>
</tr>

For 2nd email, remove the following:
<tr>
<td class="tdVertical">
<label id="email2Label" for="email2">2nd E-Mail:</label>
</td>
<td class="tdData">
<input type="text" tabindex="4" name="email2" id="email2" class="inputbox" style="width: 150px" value="<?php if (isset($this->preassignedFields['email2'])) $this->_($this->preassignedFields['email2']); ?>" onchange="checkEmailAlreadyInSystem(this.value);" />
</td>
</tr>


You can remove any of the fields from that screen like this.

Re: Need To Alter Candidate's Field & Input type.

Posted: 21 Sep 2017, 15:21
by karthikjoe
Thanks Cptr13

Its Working superb. But Another one thing how can i change field names and input types..?.i think there are several files & Databases are linked field name. Is This possible..?

Re: Need To Alter Candidate's Field & Input type.

Posted: 21 Sep 2017, 15:23
by cptr13
I'm not clear on your question.

You want to change existing? Or add new?

Adding a new one is pretty simple.

Changing existing, I'd have to look and get back to you

Re: Need To Alter Candidate's Field & Input type.

Posted: 22 Sep 2017, 06:33
by karthikjoe
Hi Cptr13

I am looking for change a existing fields...

Re: Need To Alter Candidate's Field & Input type.

Posted: 22 Sep 2017, 10:12
by cptr13
Ok.

I think I would recommend not changing existing fields.

Unless.

If the purpose of the field stays the same, and you are only changing the word that's is labeled...it would be ok.

I am using the Add candidate screen for examples. The principle is the same across OpenCATs though.

For example, if you wanted to change the "Cell Phone" to "Mobile phone". That would be ok.
If you wanted to change the "cell phone" field to "favorite food", it may get weird.

The reason why, is that if you change the front end stuff (what you see on the web interface) but you don't change the back end stuff (what goes in to the database), OpenCATS will call it "favorite food" on the front, but think it's "cell phone" in the database.

I'm not a programmer, so I don't know how that would affect things, if at all.

See next post for more information.

Re: Need To Alter Candidate's Field & Input type.

Posted: 22 Sep 2017, 10:45
by cptr13
This is a minor edit example. I am using the prior "Cell Phone" to "Mobile Phone" to show.

Again, this is fine, because the intent isn't changing, therefore, no database changes are necessary.

If we want to change all the labels from "Cell Phone" to "Mobile Phone" we have to make changes for a few screens.

We need to find the "Cell Phone" on the following files and change them to "Mobile phone"

BE CAREFUL TO NOT CHANGE ANYTHING ELSE!!!!!

Example from Modules/contacts/Edit.tpl:
<tr>
<td class="tdVertical">
<label id="phoneCellLabel" for="phoneCell">Mobile Phone:</label>
</td>
<td class="tdData">
<input type="text" name="phoneCell" id="phoneCell" value="<?php $this->_($this->data['phoneCell']); ?>" class="inputbox" style="width: 150px" />
</td>
</tr>

That is the only change to make here. That's what appears on your screen. The other cell references or programming stuff which may affect the functionality.


For candidates, change:
Modules/candidates/Add.tpl

modules/candidates/Show.tpl

modules/import/ImportUI.php

modules/candidates/Edit.tpl

For company contacts, also change:
modules/contacts/Add.tpl

modules/companies/Show.tpl

modules/contacts/Show.tpl

modules/contacts/Edit.tpl

Re: Need To Alter Candidate's Field & Input type.

Posted: 22 Sep 2017, 10:49
by cptr13
Also, please start a separate post for the pdf upload question

Re: Need To Alter Candidate's Field & Input type.

Posted: 23 Sep 2017, 08:07
by karthikjoe
Thanks Cptr13 for your valuable reply.. It's Working awesome now.

Re: Need To Alter Candidate's Field & Input type.

Posted: 17 Aug 2020, 21:04
by jkgjhghf
The reason why, is that in case you change the front give up stuff (what you notice on the web interface) however you do not alternate the back give up stuff like this post(what is going in to the database), OpenCATS will call it "preferred meals" on the the front, however suppose it's "cell phone" in the database.

Re: Need To Alter Candidate's Field & Input type.

Posted: 29 Dec 2020, 21:53
by William James
You must put same thing on front end and same thing on back end. For Example: this website is related to grilling and smoking, this is providing best pellet grills and smokers; not any irrelevant thing.