Support » Plugin: WP Job Manager » Setting Placeholders on Forms

  • Resolved thedan1984

    (@thedan1984)


    I looked over the documentation and this page,
    https://github.com/Automattic/WP-Job-Manager/blob/master/includes/forms/class-wp-job-manager-form-submit-job.php

    It was super helpful for changing CERTAIN default labels and placeholders in my theme’s function.php file. However, I can’t seem to figure out if you can target the company phone number for example. For this project, it’s important for us to include placeholders on every form field and the phone number field doesn’t have one.

    Furthermore, I can’t find it’s mention in the Github link above which has all the other company info/parameters mentioned (e.g. company_name, company_website, company_tagline, etc.) Heck, the word “phone” doesn’t even show up in that file at all.

    Any ideas?

Viewing 7 replies - 1 through 7 (of 7 total)
  • If nothing else, the WP Job Manager Field Editor add-on should let you do this (and more).

    Thanks for the link to the plugin. I’m not looking to do this with a plugin. I’m capable of doing this in my theme’s function file. I am just seeking better documentation or at least a full list of variables available.

    Completely understandable–hopefully, the WPJM staff or other users will be able to point you in the right direction. Better documentation is definitely needed and would be appreciated by more than just you, too–if you find the answer independently, if you could still post back here to let others know, that would be very kind!

    WP Job Manager’s support told me that their plugin isn’t responsible for the placeholder fields..

    “You can find them all in the github page you linked to:
    https://github.com/Automattic/WP-Job-Manager/blob/master/includes/forms/class-wp-job-manager-form-submit-job.php

    Phone number is not actually a default field on the job submission form. Are you using another plugin or a theme that might add its own fields? If so you may need to edit it within that theme/plugin, but yes, every text field can have a placeholder.”

    Oddly enough, my theme creator said they don’t include a phone number by default and pointed to WP Job Manager’s Git hub page. I’ll keep plugging away and will return with the solution if I figure it out.

    Plugin Contributor Richard Archambault

    (@richardmtl)

    Do let us know if you find the solution, @thedan1984 ! As we said via email, something else on the site (custom code, or the theme) must be adding that field, but I don’t know what!

    thedan1984

    (@thedan1984)

    OK, after further testing, I highly suspect the theme creators are wrong. I cloned my site, deactivated every plugin with exception to WP Job Manager. The issue persisted. I switched to a generic theme, and the phone number field disappeared (as you suggested it would).

    I sent the theme creator an email suggesting that maybe they were incorrect in when they pushed the blame onto another plugin.

    I realize this is now more of a theme (Listify) related issue, but if you could leave this thread open, I will drop the answer/solution in when I get it done… might be useful to others all the same!

    • This reply was modified 3 months ago by thedan1984.

    John from Astoundify (creators of Listify theme) found the file on their theme that is responsible for this.

    The file named, class-wp-job-manager.submission.php (located in “../listify/inc/integrations/wp-job-manager/”) is where the code is located. For adding a placeholder, this is the code that managed to do the trick:

    
    	public function phone( $fields ) {
    		$fields['company']['phone'] = array(
    			'label'       => __( 'Phone Number', 'listify' ),
    			'type'        => 'text',
    			'placeholder' => '###-###-####',
    			'required'    => false,
    			'priority'    => 2.5,
    		);
    
    		return $fields;
    	}
    
    • This reply was modified 2 months, 4 weeks ago by thedan1984.
Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.