-4

I am running a job board and individuals can post jobs. On my Post a job page, the title where the user enters in the title of a job he/she is posting (ex. warehouse worker) does not have a max length to limit the amount of characters or letters they use.

In result, the words run across the page and over laps other content on that page. How can I fix this?

The guy who created this job board gave me this code to fix it, but I have no idea in what file to place it in. I've been given very limited information

add_filter("wpjb_form_init_job", "my_wpjb_form_init_job");
function my_wpjb_form_init_job($form) {
    $form->getElement("job_title")->addValidator(new Daq_Validate_StringLength(1, 80));
    return $form;
}
  • Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. – Ziumin Jan 02 '15 at 19:05
  • 1
    http://stackoverflow.com/help/how-to-ask – Floegipoky Jan 02 '15 at 19:06
  • I removed the `php` tag because I don't see anything at all about PHP contained in the question. – Sparky Jan 02 '15 at 19:07
  • Filters often go in a `functions.php` file in your theme. If you are not running your own theme you may wish to add a child theme, but that is complex unless you are at least somewhat familiar with WP development. – halfer Jan 02 '15 at 19:45
  • @halfer - Is pagelines a child theme? and the issue that im having is with my job board plug in (wpjobboard). So even if its my plug in that im trying to modify , I still need to do the modification to my theme functions file or my plugins functions file? – chris hughes Jan 02 '15 at 19:58
  • "Is pagelines a child theme?" - I don't know if it is a theme at all, or what it is. Go to your themes control panel and look it up. If it is in there, it is a theme, and I believe it will tell you if it is a child theme (it will tell you what the parent theme is too). – halfer Jan 02 '15 at 20:00
  • "So even if [it's] my plug in that [I'm] trying to modify" - I'm not a WP dev, but I would put this in a functions file that (a) had other filters in it, and (b) would not be overwritten by a plugin/theme upgrade. Your developer will be able to advise you where to best add this (if he or she is unavailable to do it for you - the ideal is to get them to do it, I think). – halfer Jan 02 '15 at 20:03

2 Answers2

0
<input type="text" maxlength="15" id="textfield" name="textfield"  />  //you can put any length says 10,15.etc
Priyank
  • 3,778
  • 3
  • 29
  • 48
-1

Try using the <input type="text" name="customName" maxlength="customLength" />. It is widely supported and is already included in the HTML 4.1 standard. People may blame me for referring to w3schools, but there you might get more information about it, e.g. the default length of 524288 characters.

EDIT: You should not make those input fields overlap. Already with quite simple techniques, e.g. the display:table property, you can avoid that.

Community
  • 1
  • 1
Tacticus
  • 561
  • 11
  • 24
  • I am using a plug in software that is running my entire job board. I am also working out of wordpress and using a dms (pagelines theme) ..... but my enitre plug-in(jobboard) is engulfed with php – chris hughes Jan 02 '15 at 19:16