code = """
// {label}
add_filter( 'submit_job_form_fields', 'frontend_add_{fieldname}_field' );
function frontend_add_{fieldname}_field($fields) {{
    $fields['job']['job_{fieldname}'] = array(
        'label' => __('{label}', 'job_manager'),
        'type' => 'text',
        'required' => {required},
        'priority' => 7,
        'placeholder' => '{placeholder}'
    );
    return $fields;
}}
add_filter( 'job_manager_job_listing_data_fields', 'admin_add_{fieldname}_field' );
function admin_add_{fieldname}_field( $fields ) {{
  $fields['_job_{fieldname}'] = array(
    'label'       => __( '{label}', 'job_manager' ),
    'type'        => 'text',
    'placeholder' => '{placeholder}',
    'description' => ''
  );
  return $fields;
}}
"""
Unexpected '{' in field name when doing string formatting