Crud: [4.0][Feature Request] JSON Field type

Created on 22 Jan 2020  路  5Comments  路  Source: Laravel-Backpack/CRUD

I was surprised to find there isn't a JSON field type for editing key value pairs like

{"city": "Groton", "email": "[email protected]", "phone": "555-221-3343", "state": "CT", "country": "US", "address_1": "42 Thorne Ave.", "last_name": "Doe", "first_name": "John"}

I think this would make a useful addition. I did manage to roll my own by bastardizing the 'table' field type:
https://gist.github.com/sjsiegel001/e7f057e27c6fb064e7f8306847658248

triage

All 5 comments

Hello there! Thanks for opening your first issue on this repo!

Just a heads-up: Here at Backpack we use Github Issues only for tracking bugs. Talk about new features is also acceptable. This helps _a lot_ in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that.

Backpack communication mediums:

  • Bug Reports, Feature Requests - Github Issues (here);
  • Quick help (_How do I do X_) - Gitter Chatroom;
  • Long questions (_I have done X and Y and it won't do Z wtf_) - Stackoverflow, using the backpack-for-laravel tag;

Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome _awesome_ community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch.

Thank you!

--
Justin Case
The Backpack Robot

Hi @sjsiegel001

Interesting. For I have build a json editor field before which you may be interested.

https://github.com/Laravel-Backpack/CRUD/pull/1655

I haven't try your field yet but is yours more like nova KeyValue field?

https://nova.laravel.com/docs/2.0/resources/fields.html#keyvalue-field

The JSON editor is a little overkill for my immediate purposes although I can think of another use case where it would be useful.

Something just like that nova KeyValue field would be perfect.

Thanks!

I'm using @ziming 's json editor field type too - works like a charm :-) Indeed, let's reopen conversation https://github.com/Laravel-Backpack/CRUD/pull/1655 and consider including it in the core. Thanks @sjsiegel001 & @ziming !

@sjsiegel001 if this works better for you, how would you like to create a quick post on backpackforlaravel.com to share your field with others? I'm sure they'd appreciate it. And if you just paste the code there, or send people to a gist that you own, you won't have to do maintenance like it's a package.

It could be as simple as explaining what you needed, why you chose this solution, including a screenshot and the link to the code.

What do you think, interested? Another option would be to post on your own blog / medium / whatever and cross-post on BackpackForLaravel.com - that way you can get some eyeballs to something you want to promote.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mikael1000 picture mikael1000  路  3Comments

AlexanderWM picture AlexanderWM  路  3Comments

alexgmin picture alexgmin  路  3Comments

genesiscz picture genesiscz  路  3Comments

voidstate picture voidstate  路  3Comments