Jean Baptiste Posted October 20, 2022 Share Posted October 20, 2022 Hello I am creating custom fields for a product. I have a dropdown field. So I would like to know how to add the default values (Mr, Mrs). Here is my code: public static function configure(array $params): void { $date = new \DateTime(); Capsule::table('tblcustomfields')->insert( [ 'type' => 'product', 'relid' => $params['pid'], 'fieldname' => 'dns_names', 'fieldtype' => 'dropdown', // Enum ('Mr', 'Mrs') 'description' => 'DNS Name', 'showorder' => 'on', 'created_at' => $date->format('Y-m-d h:i:s') ] ); } 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.