Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Contributor Dan (a11n)

    (@drawmyface)

    Can you post your full code snippets, and where you added each one?

    Thread Starter kromix

    (@kromix)

    I add this code in function.php

    //ADD DATA SUBMIT JOB ADMIN
                    // Add field to admin
                    add_filter( 'resume_manager_resume_fields', 'wpjms_admin_resume_form_fields' );
                    function wpjms_admin_resume_form_fields( $fields ) {
    
                     $fields['_luogo_nascita'] = array(
                        'label' 		=> __( 'Luogo di nascita', 'job_manager' ),
                        'type' 			=> 'text',
                        'placeholder' 	=> __( '', 'job_manager' ),
                        'description'	=> '',
                        'priority' => 2
                    );
    
                        $fields['_data_nascita'] = array(
                        'label' 		=> __( 'Data di nascita', 'job_manager' ),
                        'type' 			=> 'text',
                        'placeholder' 	=> __( 'gg/mm/aaaa', 'job_manager' ),
                        'description'	=> '',
                        'priority' => 3
                    );
    
                     $fields['_prov_nascita'] = array(
                        'label' 		=> __( 'Provincia di nascita', 'job_manager' ),
                        'type' 			=> 'text',
                        'placeholder' 	=> __( '', 'job_manager' ),
                        'description'	=> '',
                        'priority' => 4
                    );
    
                      $fields['_luogo_residenza'] = array(
                        'label' 		=> __( 'Luogo di residenza', 'job_manager' ),
                        'type' 			=> 'text',
                        'placeholder' 	=> __( '', 'job_manager' ),
                        'description'	=> '',
                        'priority' => 6
                    );
    
                      $fields['_ind_residenza'] = array(
                        'label' 		=> __( 'Indirizzo di residenza', 'job_manager' ),
                        'type' 			=> 'text',
                        'placeholder' 	=> __( '', 'job_manager' ),
                        'description'	=> '',
                        'priority' => 5
                    );
    
                        $fields['_cod_fiscale'] = array(
                        'label' 		=> __( 'Codice fiscale', 'job_manager' ),
                        'type' 			=> 'text',
                        'placeholder' 	=> __( '', 'job_manager' ),
                        'description'	=> '',
                        'priority' => 7
                    );
                        $fields['_telefono_candidato'] = array(
                        'label' 		=> __( 'Telefono ', 'job_manager' ),
                        'type' 			=> 'text',
                        'placeholder' 	=> __( '', 'job_manager' ),
                        'description'	=> '',
                        'priority' => 9
                    );
    
                        $fields['_invalidita'] = array(
                        'label' 		=> __( 'Percentuale invaliditá', 'job_manager' ),
                        'type' 			=> 'text',
                        'placeholder' 	=> __( '', 'job_manager' ),
                        'description'	=> '',
                        'priority' => 11
                    );
                        $fields['_parenti'] = array(
                        'label' 		=> __( 'Ha parenti giá alle dipendenze di Ascot?', 'job_manager' ),
                        'type' 			=> 'select',
                        'placeholder' 	=> __( '', 'job_manager' ),
                        'description'	=> '',
                        'priority' => 12
                    );
    
                    return $fields;
    
                    }
                    // ADD DATA SUBMIT JOB FRONTEND
                    add_filter( 'submit_resume_form_fields', 'wpjms_frontend_resume_form_fields' );
                    function wpjms_frontend_resume_form_fields( $fields ) {
    
                        $fields['resume_fields']['_data_nascita'] = array(
                        'label' => __( 'Data di nascita', 'job_manager' ),
                        'type' => 'text',
                        'required' => true,
                        'placeholder' => 'gg/mm/aaaa',
                        'priority' => 3
                    );
    
                         $fields['resume_fields']['_luogo_nascita'] = array(
                        'label' => __( 'Luogo di nascita', 'job_manager' ),
                        'type' => 'text',
                        'required' => true,
                        'placeholder' => '',
                        'priority' => 2
                    );
    
                     $fields['resume_fields']['_prov_nascita'] = array(
                        'label' => __( 'Provincia di nascita', 'job_manager' ),
                        'type' => 'text',
                        'required' => true,
                        'placeholder' => '',
                        'priority' => 4
                    );
    
                      $fields['resume_fields']['_ind_residenza'] = array(
                        'label' => __( 'Luogo di residenza', 'job_manager' ),
                        'type' => 'text',
                        'required' => true,
                        'placeholder' => '',
                        'priority' => 5
                    );
                       $fields['resume_fields']['_luogo_residenza'] = array(
                        'label' => __( 'Indirizzo di residenza', 'job_manager' ),
                        'type' => 'text',
                        'required' => true,
                        'placeholder' => '',
                        'priority' => 6
                    );
    
                         $fields['resume_fields']['_cod_fiscale'] = array(
                        'label' => __( 'Codice fiscale', 'job_manager' ),
                        'type' => 'text',
                        'required' => true,
                        'placeholder' => '',
                        'priority' => 7
                    );
                          $fields['resume_fields']['_telfono_candidato'] = array(
                        'label' => __( 'Telefono', 'job_manager' ),
                        'type' => 'text',
                        'required' => true,
                        'placeholder' => '',
                        'priority' => 9
                    );
    
                          $fields['resume_fields']['_invalidita'] = array(
                        'label' => __( 'Percentuale di invaliditá', 'job_manager' ),
                        'type' => 'text',
                        'required' => false,
                        'placeholder' => '',
                        'priority' => 11
                    );
    
                          $fields['resume_fields']['_parenti'] = array(
                        'label' => __( 'Ha Parenti giá alle dipendenze di ascot?', 'job_manager' ),
                        'type' => 'select',
                        'option' => array(key  => yes,  key2 => no,),
                        'required' => false,
                        'placeholder' => '',
                        'priority' => 12
                    ); 
    
                    return $fields;
    
                    }

    And all fields appear in back end end front-end.

    But when i add this
    <?php echo get_post_meta( $post->ID, '_candidate_color', true ); ?>
    in content-single-resume-php the method get doesn’t work.

    I have the field but is impossible to save the value on submit.

    Thread Starter kromix

    (@kromix)

    Someone has good instruction to rezolve the problem?

    Thank you!

    Plugin Contributor Dan (a11n)

    (@drawmyface)

    So you literally added this?

    <?php echo get_post_meta( $post->ID, '_candidate_color', true ); ?>

    That is just the example for adding a Favorite Color field. You’ll need to adapt it to add your own custom fields.

    e.g. you’ll need to add:

    <?php echo get_post_meta( $post->ID, '_luogo_nascita', true ); ?>
    <?php echo get_post_meta( $post->ID, '_data_nascita', true ); ?>

    etc.

    Thread Starter kromix

    (@kromix)

    No no! I know that is example!
    I just insert the right code for all new fields.

    The POST of variabales are correct but the get doesn’t work.

    I show you the page:
    https://www.ascotinternational.com/submit-resume/

    Thanks!

    Plugin Contributor Dan (a11n)

    (@drawmyface)

    The code you used to add the fields to the frontend is wrong. The custom fields shouldn’t have underscores in front of them there.

    So where you have:

    $fields['resume_fields']['_data_nascita']

    It should be:

    $fields['resume_fields']['data_nascita']

    etc.

    Hope that helps.

    Thread Starter kromix

    (@kromix)

    Thanks for your help, but the problem is not solved.

    I try both case with underscore and without underscore in content-single-resume.php:

    <?php echo "test---->".get_post_meta( $post->ID, '_luogo_nascita', true ); ?>
     <?php echo "test1---->".get_post_meta( $post->ID, 'luogo_nascita', true ); ?>

    I bought the plugin for the opportunity to add new fields.

    Waiting for other suggestion to fix it!

    Thread Starter kromix

    (@kromix)

    And i just edit the code in function.php

    // ADD DATA SUBMIT JOB FRONTEND
                    add_filter( 'submit_resume_form_fields', 'wpjms_frontend_resume_form_fields' );
                    function wpjms_frontend_resume_form_fields( $fields ) {
    
                        $fields['resume_fields']['data_nascita'] = array(
                        'label' => __( 'Data di nascita', 'job_manager' ),
                        'type' => 'text',
                        'required' => true,
                        'placeholder' => 'gg/mm/aaaa',
                        'priority' => 3
                    );
    
                         $fields['resume_fields']['luogo_nascita'] = array(
                        'label' => __( 'Luogo di nascita', 'job_manager' ),
                        'type' => 'text',
                        'required' => true,
                        'placeholder' => '',
                        'priority' => 2
                    );
    
                     $fields['resume_fields']['prov_nascita'] = array(
                        'label' => __( 'Provincia di nascita', 'job_manager' ),
                        'type' => 'text',
                        'required' => true,
                        'placeholder' => '',
                        'priority' => 4
                    );
    
                      $fields['resume_fields']['ind_residenza'] = array(
                        'label' => __( 'Luogo di residenza', 'job_manager' ),
                        'type' => 'text',
                        'required' => true,
                        'placeholder' => '',
                        'priority' => 5
                    );
                       $fields['resume_fields']['luogo_residenza'] = array(
                        'label' => __( 'Indirizzo di residenza', 'job_manager' ),
                        'type' => 'text',
                        'required' => true,
                        'placeholder' => '',
                        'priority' => 6
                    );
    
                         $fields['resume_fields']['cod_fiscale'] = array(
                        'label' => __( 'Codice fiscale', 'job_manager' ),
                        'type' => 'text',
                        'required' => true,
                        'placeholder' => '',
                        'priority' => 7
                    );
                          $fields['resume_fields']['telefono_candidato'] = array(
                        'label' => __( 'Telefono', 'job_manager' ),
                        'type' => 'text',
                        'required' => true,
                        'placeholder' => '',
                        'priority' => 9
                    );
    
                          $fields['resume_fields']['invalidita'] = array(
                        'label' => __( 'Percentuale di invalidit&aacute;', 'job_manager' ),
                        'type' => 'text',
                        'required' => false,
                        'placeholder' => '',
                        'priority' => 11
                    );
    
                          $fields['resume_fields']['parenti'] = array(
                        'label' => __( 'Ha Parenti gi&aacute; alle dipendenze di ascot?', 'job_manager' ),
                        'type' => 'select',
                        'option' => array(key  => yes,  key2 => no,),
                        'required' => false,
                        'placeholder' => '',
                        'priority' => 12
                    ); 
    
                    return $fields;
    
                    }
    Plugin Contributor Dan (a11n)

    (@drawmyface)

    It’s working on my test site.

    Can you paste the contents of your content-single-resume.php file? (Also make sure your theme isn’t already overriding this file.)

    Thread Starter kromix

    (@kromix)

    This the file with my customization:

    <?php if ( resume_manager_user_can_view_resume( $post->ID ) ) : ?>
    	<div class="single-resume-content">
     <?php print_r($_POST); ?>
    		<?php do_action( 'single_resume_start' ); ?>
    
    		<div class="resume-aside">
    
    			<?php the_resume_links(); ?>
    			<p class="job-title"><?php the_candidate_title(); ?></p>
    			<p class="location"><?php echo "test---->".get_post_meta( $post->ID, '_luogo_nascita', true ); ?>
                            <?php echo "test1---->".get_post_meta( $post->ID, 'luogo_nascita', true ); ?>
                            <?php echo "test2---->".get_post_meta( $post->ID, 'cod_fiscale', true ); ?>
                            <?php echo "test3---->".get_post_meta( $post->ID, '_cod_fiscale', true ); ?></p>
    
    			<?php the_candidate_video(); ?>
    		</div>
    
    		<div class="resume_description">
    			<?php echo apply_filters( 'the_resume_description', get_the_content() ); ?>
                        <?php echo apply_filters( '_candidate_color', get_the_content() ); ?>
    		</div>
    
    		<?php if ( ( $skills = wp_get_object_terms( $post->ID, 'resume_skill', array( 'fields' => 'names' ) ) ) && is_array( $skills ) ) : ?>
    			<h2><?php _e( 'Skills', 'wp-job-manager-resumes' ); ?></h2>
    			<ul class="resume-manager-skills">
    				<?php echo '<li>' . implode( '</li><li>', $skills ) . '</li>'; ?>
    			</ul>
    		<?php endif; ?>
    
    		<?php if ( $items = get_post_meta( $post->ID, '_candidate_education', true ) ) : ?>
    			<h2><?php _e( 'Education', 'wp-job-manager-resumes' ); ?></h2>
    			<dl class="resume-manager-education">
    			<?php
    				foreach( $items as $item ) : ?>
    
    					<dt>
    						<small class="date"><?php echo esc_html( $item['date'] ); ?></small>
    						<h3><?php printf( __( '%s at %s', 'wp-job-manager-resumes' ), '<strong class="qualification">' . esc_html( $item['qualification'] ) . '</strong>', '<strong class="location">' . esc_html( $item['location'] ) . '</strong>' ); ?></h3>
    					</dt>
    					<dd>
    						<?php echo wpautop( wptexturize( $item['notes'] ) ); ?>
    					</dd>
    
    				<?php endforeach;
    			?>
    			</dl>
    		<?php endif; ?>
    
    		<?php if ( $items = get_post_meta( $post->ID, '_candidate_experience', true ) ) : ?>
    			<h2><?php _e( 'Experience', 'wp-job-manager-resumes' ); ?></h2>
    			<dl class="resume-manager-experience">
    			<?php
    				foreach( $items as $item ) : ?>
    
    					<dt>
    						<small class="date"><?php echo esc_html( $item['date'] ); ?></small>
    						<h3><?php printf( __( '%s at %s', 'wp-job-manager-resumes' ), '<strong class="job_title">' . esc_html( $item['job_title'] ) . '</strong>', '<strong class="employer">' . esc_html( $item['employer'] ) . '</strong>' ); ?></h3>
    					</dt>
    					<dd>
    						<?php echo wpautop( wptexturize( $item['notes'] ) ); ?>
    					</dd>
    
    				<?php endforeach;
    			?>
    			</dl>
    		<?php endif; ?>
    
    		<ul class="meta">
    			<?php do_action( 'single_resume_meta_start' ); ?>
    
    			<?php if ( get_the_resume_category() ) : ?>
    				<li class="resume-category"><?php the_resume_category(); ?></li>
    			<?php endif; ?>
    
    			<li class="date-posted" itemprop="datePosted"><date><?php printf( __( 'Updated %s ago', 'wp-job-manager-resumes' ), human_time_diff( get_the_modified_time( 'U' ), current_time( 'timestamp' ) ) ); ?></date></li>
    
    			<?php do_action( 'single_resume_meta_end' ); ?>
    		</ul>
    
    		<?php get_job_manager_template( 'contact-details.php', array( 'post' => $post ), 'wp-job-manager-resumes', RESUME_MANAGER_PLUGIN_DIR . '/templates/' ); ?>
    
    		<?php do_action( 'single_resume_end' ); ?>
    	</div>
    <?php else : ?>
    
    	<?php get_job_manager_template_part( 'access-denied', 'single-resume', 'wp-job-manager-resumes', RESUME_MANAGER_PLUGIN_DIR . '/templates/' ); ?>
    
    <?php endif; ?>

    I think there isn’t ovverriding because if I insert new html code in content-single.resume.php, it works.

    Thread Starter kromix

    (@kromix)

    I remeber you the page to see the result:
    https://www.ascotinternational.com/submit-resume/

    Thank you again!

    Plugin Contributor Dan (a11n)

    (@drawmyface)

    Please submit a support ticket here, and provide admin login details so we can investigate:

    https://wpjobmanager.com/support/

    Thread Starter kromix

    (@kromix)

    OK! DONE!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Submit resume doesn't work with new fields’ is closed to new replies.