Search found 3 matches

by metamouse
Sun Sep 12, 2021 5:00 pm
Forum: General
Topic: How to set custom field values when creating new page via API ?
Replies: 5
Views: 249

Re: How to set custom field values when creating new page via API ?

I don't know your code, I mean how do you encode to JSON, I can show you an example I just did with curl command. Admin panel > Settings > Custom field { "subtitle": { "type": "string", "placeholder": "Subtitle for the page" } } Curl to the API with the custom subtitle curl 'http://localhost/api/pa...
by metamouse
Sun Sep 12, 2021 3:25 pm
Forum: General
Topic: How to set custom field values when creating new page via API ?
Replies: 5
Views: 249

Re: How to set custom field values when creating new page via API ?

Hi, yes you can send the custom field through the API, but first, you need to define the custom fields in Admin panel > Settings > Custom fields. Here is the part of the code for the page creation and the custom fields. https://github.com/bludit/bludit/blob/master/bl-kernel/pages.class.php#L68-L78 ...
by metamouse
Sun Sep 12, 2021 6:43 am
Forum: General
Topic: How to set custom field values when creating new page via API ?
Replies: 5
Views: 249

How to set custom field values when creating new page via API ?

Using the API, how do I pass the custom field values when creating a new page? Please I'd appreciate some help with this. Just need to know if it's even possible and how the format is to send in the curl post. Example of new page fields via api. $fields = array( 'token' => "ahblah", 'authentication'...