• Resolved coopersita

    (@coopersita)


    I added a couple of custom fields to my forms. Similar to what’s done here: https://wpjobmanager.com/document/tutorial-adding-a-salary-field-for-jobs/

    The problem is that I’m adding wp-editor type fields, and it looks like when they are saved, the plugin removes all HTML, so in essence, my fields are losing all the formatting. Is there a way to fix this?

    Also, setting a field to wp-editor in the admin section makes it so it doesn’t show up at all. If I set it to textarea, then it works.

    add_filter('submit_job_form_fields', 'edit_job_form_fields', 9999999999);
    
    function edit_job_form_fields($fields)
    {
    
        if (!isset($fields['company'])) return $fields;
    
    	$fields['company']['company_contact']['label'] = "Contact Information";
    	$fields['company']['company_contact']['priority'] = 5;
    	$fields['company']['company_contact']['type'] = "wp-editor";
    	$fields['company']['company_contact']['required'] = true;
    	
        return $fields;
    }
    
    add_filter( 'job_manager_job_listing_data_fields', 'edit_admin_job_fields' );
    
    function edit_admin_job_fields( $fields ) {
    
    	$fields['_company_contact']['label'] = "Contact Information";
    	$fields['_company_contact']['priority'] = 5;
    	$fields['_company_contact']['type'] = "textarea";
    	
        return $fields;
    }

    Any ideas?

    • This topic was modified 3 years, 4 months ago by coopersita. Reason: Added relevant code
    • This topic was modified 3 years, 4 months ago by coopersita.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wp-editor custom field removes tags’ is closed to new replies.