pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.06k stars 265 forks source link

User Profile Form: Label options #7243

Open linux-man opened 6 months ago

linux-man commented 6 months ago

Problem to Solve

Related do #7242 , I'm working on pt_pt and naturally the custom field labels are correct, but is there any way to relabel "user_nicename", "display_name" and other internal fields on a shortcode [pods-form]?

Proposed Solution

Since the fields already exist, they can't be recreated on Pods. A "labels" parameter should fix it, but since custom fields are already labeled it doesn't make much sense. Can't find anything on Polylang, and I really don't want to translate a site - just some labels.

Possible Workaround

No response

Examples Elsewhere

No response

Screenshots / Screencast

No response

linux-man commented 6 months ago

Once again, PHP template to the rescue:

<?php
$user = wp_get_current_user();
$id = $user->id;
$Record = Pods('user', $id);
$fields = array( 'user_nicename'  => array( 'label' => 'Utilizador' ) ,'display_name'  => array( 'label' => 'Nome' ) , 'escola' , 'numero' , 'estatuto' , 'categoria' , 'departamento' ,'grupo');
echo $Record->form( $fields );
?>