Keyword

Batch Editing of Extra Fields

More
6 years 2 months ago #169090 by Ralf
Batch Editing of Extra Fields was created by Ralf
I have a client who has many similar Extra Fields set to Required and which now have to be changed to Not-Required.

Is there anyway to do this as mass-edit as in Wordpress?

In case this question has been answered already I didn't find it. Please push me in the right direction. Thx :-)

Please Log in or Create an account to join the conversation.

More
6 years 2 months ago #169093 by JoomlaWorks
Replied by JoomlaWorks on topic Batch Editing of Extra Fields
There is currently no batch editing for extra fields in K2, sorry.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
6 years 2 months ago - 6 years 2 months ago #169134 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic Batch Editing of Extra Fields
Hi Ralf,
If you can access the database to run SQL statements, this can be done.
Extra field parameters, like the required parameter, are saved as JSON string, so SQL can be used to modify this string and replace "required":1 with "required":0

Make sure to backup the table #__k2_extra_fields at first.
The SQL statement can be something like this, replace '#_' with your database prefix:
UPDATE #__k2_extra_fields 
SET `value` = REPLACE(`value`, '"required":1', '"required":0')
WHERE id IN (Field1, Field1, ..., FieldN )
Please make sure to replace Field1, Field1, ..., FieldN with a comma separated field ids which you want to edit

Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Last edit: 6 years 2 months ago by Mohamed Abdelaziz.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum