Closed tomislav13 closed 4 years ago
Hey @tomislav13
Unfortunately, there is no plan to support camelCase fields right now. TypeRocket enforces snake_case for consistency with the WP standard https://codex.wordpress.org/Database_Description (though the old table fields on early WP do not follow that pattern). Also, using snake_case enables better compatibility with third party plugins.
Thanks, Kevin
Thanks for quick response, I think I will then use the snake_case...
Regards, I am using custom resources ie custom tables, and in my edit.php form I have camelCase field like this:
echo $form->text('myField')
but it looks like this field's value is not populated (in form). In my add.php form, I found that the field are converted to lowercase and knowing that I just fetch myfield and this works. Update: I found temporary solution, where I need to manually convert those fields, but this is not very practical:Can you implement camelCase support here? Also, can I suggest that you improve the docs with tr_form's 4th argument? Because this doesn't work:
$form = tr_form($this->modelSlug, 'update', $id);
but this does:$form = tr_form($this->modelSlug, 'update', null, $model);
and this also doesn't work:$form = tr_form($this->modelSlug, 'update', $id, $model);