php - How to populate forms with multidimensional names -
i'm using larave4 , cannot populate forms multidimensional names. need pre-populate form data display screen.
i understand , have tested following works
$values = array( ); $values['username'] = 'ned stark'; $values['email'] = 'my@email.com'; $fake = new fakemodle( ) //empty model filling $fake->fill($values); form::make($fake);
so long input field names match names of values used fill model works fine. form populated values.
however if have multidimensional names form inputs not work. have tried many variations such as.
$values = array( ); $values['account_details']['username'] = 'ned stark'; $values['account_details[username]'] = 'ned stark'; $values['account_details-username'] = 'ned start';
to work inputs like
<input type="text" name="account_details[username]" />
from
$fake = new fakemodle( ) //empty model filling $fake->fill($values); form::make($fake); form::input('text','account_details[username]',null);
cannot work or find detials on this. how form values populated multidimensional input names? doing wrong?
Comments
Post a Comment