Admin - Add new post - hook to display some custom input fields - wordpress-theming

i have a custom post type
this post type needs some fields to be inserted into a custom MySQL table (wp_my_custom_table) where i store some relations IDs with other products and a number to sort them
i don't know how to put these input fields them after the textarea. I know how to insert them at "save_post" action hook.
these are not registered as "custom fields", are just a few input fields needed for each post type like this
The tag doesn't work, so i put the code that i have tried as image:

I have found, there is a hook "edit_form_after_editor".

Related

How to hide field base on method PUT or POST or advance condition in spring controller by springdoc-openapi

I can't find the way to hide field base on method in springdoc-api.
Example:
For POST method, i want to hide status field in DTO.
For PUT method, i want to show status field in DTO.
How can i config it by springdoc-openapi or anyway i can hidden field base on the condition.

JSON parse the fields which user wants in Django REST API framework

I want to make users to be able to change some values of the object. For example, there is an event with ID "Id1" at "20.12.2021 14:00:00+00:00", a title of the event "the title", a description - "the description" and participants of the event ["Anne", "Jean", "Eren", "Sasha", "ME"].
I need to write a view which allows a user to change/update any of this values. If he wants, he can change only datetime, or only participants, or only title, or datetime AND title, or all the fields at once(although it is better to create a new event if it is needed to change everything in the first event, but anyways). So I need to know how to write a view which allows user to JSON parse only the fields he wants.
You can create a model serializer to serialize your Event objects and the view class can use this serializer. Check out Django Rest Framework's docs https://www.django-rest-framework.org/api-guide/serializers/#modelserializer

Merge Json Object in form builder

I have two roles i-e, Admin & User. Admin have access to add dynamic field in form and the form is saved in json format and now user can access that form and input data in it and its also saved in json format.
My problem is that when admin edit the form and add a new field inside it, how can i tackle this.
For example, admin make a form that have Product name, Product detail and Product pics and now user can add 5 items in it using this form, after few time admin added one more field in form, that is Product Type and how can i add this field in users previous posts.
Note: Admin form and user submission is in json format but both are saved in separate tables.
Admin Form Builder
Json of form builder and its save in form_sections table
User View of form
Users json is store in products table
when admin update form, json of form builder is updated but how i update the user json?
Changing the Product schema require your application to be backward compatible.
That means your code should be able to deal with both new data(with Product Type field) and old data(without Product Type field).
Possible solutions:
Leave old product Product Type field empty, let user fill it later.
Loop through old product data and set Product Type field with a default value.

Infusionsoft populate custom field via API

I am trying to set the value of a custom field that belongs to a contact via the Infusionsoft API.
When I try to create or update the contact with the custom field value set I receive the following response:
[NoFieldFound]No field found: Contact.InitialSiteVisitTime
Which leads me to believe that the custom field value is stored in a different table. Can anyone please tell me the name of the table that holds Infusionsofts custom field values?
Infusionsoft automatically prefixes custom field names with an underscore. Adding the underscore to the name allows to populate this value via the API successfully.
Note, that custom fields API names (the way they stored in Infusionsoft database) not always equal to how you name a custom field on creation.
This article shows where your actual custom fields API names are listed.

Change post type name without losing custom field values

I need to change the name of one of my custom post types. These posts have several custom fields associated with them. After changing the name, I update the name of the post types in the database and all of the posts appear again in Wordpress. However, they seem to have lost their custom field information. Is this also updatable?
Just Run following query in your wp_posts
UPDATE `wp_posts` SET `post_type`='<old-value>' WHERE `post_type`='new value';
Do remember to enter your old post type name and new post type name, changing post type name will not effect custom fields as meta fields are associated with post id only.
Cheers...