Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use first_name, last_name or description in Pods form for Extended User #3430

Closed
S8nsick66 opened this issue Mar 3, 2016 · 2 comments

Comments

@S8nsick66
Copy link

Pod "mypod", Type: User (extended), Storage Type: Meta
Pods 2.6.1
WP 4.4.1

From the docs (http://pods.io/docs/code/pods/form/):

Test 1: field names only

$mypod = pods( 'mypod' ); 
$fields = array( 'description' ); 
echo $mypod->form( $fields ); 

Result: Form field is not displayed, lots of "Undefined index".
Notice: Undefined index: type in /pods/ui/front/form.php on line 13
Notice: Undefined index: options in /pods/ui/front/form.php on line 13
Notice: Undefined index: label in /pods/ui/front/form.php on line 114
Notice: Undefined index: help in /pods/ui/front/form.php on line 114
Notice: Undefined index: in /pods/classes/PodsForm.php on line 212

Test 2: array with default values

$mypod = pods( 'mypod' ); 
$fields = array(
    'description' => array(
        'label' => 'Description',
        'type' => 'paragraph',
        'help' => '',
        'options' => array(
            'required' => true,
        )
    )
);
echo $mypod->form( $fields ); 

Result: Form is displayed with description field. On submit, alert with "Error: User data is required but is either invalid or empty"

Test 3: array + existing pod id

$mypod = pods( 'mypod', $id ); 
$fields = array(
    'description' => array(
        'label' => 'Description',
        'type' => 'paragraph',
        'help' => '',
        'options' => array(
            'required' => true,
        )
    )
);
echo $mypod->form( $fields ); 

Result: Form is display, with description field. On submit, redirected to "?success=1" but the value is not saved.

@jimtrue jimtrue changed the title Can't use first_name, last_name or description in Pods form Can't use first_name, last_name or description in Pods form for Extended User Mar 3, 2016
@quasel
Copy link
Member

quasel commented Sep 5, 2016

is this still an issue?

@jimtrue
Copy link
Contributor

jimtrue commented Apr 4, 2017

Related #1890

@pods-framework pods-framework locked and limited conversation to collaborators Aug 11, 2022
@sc0ttkclark sc0ttkclark converted this issue into discussion #6625 Aug 11, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

3 participants