Home › Forums › ACF PRO › wp_insert_post() and populating ACF Blocks › Reply To: wp_insert_post() and populating ACF Blocks
here is my acf block settings
{
"key": "group_5c36cf493f91b",
"title": "My - Payment Options",
"fields": [
{
"key": "field_5c36cf5487c08",
"label": "Payment Options",
"name": "my_land_payment_options",
"type": "repeater",
"instructions": "First and second payment option will display in the land grid. The first option will be shown in colors. The second payment option will be a line of smaller black text.",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"collapsed": "",
"min": 1,
"max": 0,
"layout": "block",
"button_label": "Add Option",
"sub_fields": [
{
"key": "field_5c36cf7387c09",
"label": "Payment Title",
"name": "my_land_payment_options_title",
"type": "text",
"instructions": "",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "Cash Price",
"placeholder": "Cash Price",
"prepend": "",
"append": "",
"maxlength": ""
},
{
"key": "field_5c36cf8787c0a",
"label": "Price",
"name": "my_land_payment_options_price",
"type": "text",
"instructions": "",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "$1234",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": ""
},
{
"key": "field_5c36cf9f87c0b",
"label": "Price Note",
"name": "my_land_payment_options_price_note",
"type": "text",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": ""
},
{
"key": "field_5c6cc891d1407",
"label": "Cross out price note",
"name": "my_land_payment_options_price_note_cross",
"type": "true_false",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"message": "",
"default_value": 0,
"ui": 0,
"ui_on_text": "",
"ui_off_text": ""
},
{
"key": "field_5c36cfae87c0c",
"label": "Payment Note",
"name": "my_land_payment_options_note",
"type": "text",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "down payment 5%",
"prepend": "",
"append": "",
"maxlength": ""
},
{
"key": "field_5c36cfc287c0d",
"label": "Button Text",
"name": "my_land_payment_options_button_text",
"type": "text",
"instructions": "",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "Reserve Now",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": ""
},
{
"key": "field_5cf7598bfd0dd",
"label": "Button Options",
"name": "my_land_payment_options_button_select",
"type": "select",
"instructions": "",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"choices": {
"button": "Custom Button",
"authorize": "Authorize.Net"
},
"default_value": [],
"allow_null": 0,
"multiple": 0,
"ui": 0,
"return_format": "value",
"ajax": 0,
"placeholder": ""
},
{
"key": "field_5cf75a2dfd0de",
"label": "Payment Type",
"name": "my_land_payment_options_authorize_payment_type",
"type": "select",
"instructions": "",
"required": 1,
"conditional_logic": [
[
{
"field": "field_5cf7598bfd0dd",
"operator": "==",
"value": "authorize"
}
]
],
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"choices": {
"one time payment": "One Time",
"recurring payment": "Recurring"
},
"default_value": [],
"allow_null": 0,
"multiple": 0,
"ui": 0,
"return_format": "value",
"ajax": 0,
"placeholder": ""
},
{
"key": "field_5cf75afcfd0df",
"label": "Payment Amount",
"name": "my_land_payment_options_authorize_payment_price",
"type": "number",
"instructions": "",
"required": 1,
"conditional_logic": [
[
{
"field": "field_5cf7598bfd0dd",
"operator": "==",
"value": "authorize"
}
]
],
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"min": "",
"max": "",
"step": ""
},
{
"key": "field_5d138724aaa98",
"label": "Interval Length",
"name": "my_land_payment_options_authorize_recurring_length",
"type": "number",
"instructions": "For an interval unit of days, use an integer between 7 and 365, inclusive. For an interval unit of months, use an integer between 1 and 12, inclusive.",
"required": 1,
"conditional_logic": [
[
{
"field": "field_5cf7598bfd0dd",
"operator": "==",
"value": "authorize"
},
{
"field": "field_5cf75a2dfd0de",
"operator": "==",
"value": "recurring payment"
}
]
],
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": 1,
"placeholder": "",
"prepend": "",
"append": "",
"min": 1,
"max": 365,
"step": ""
},
{
"key": "field_5cf75b5efd0e0",
"label": "Interval Unit",
"name": "my_land_payment_options_authorize_recurring_type",
"type": "select",
"instructions": "",
"required": 1,
"conditional_logic": [
[
{
"field": "field_5cf7598bfd0dd",
"operator": "==",
"value": "authorize"
},
{
"field": "field_5cf75a2dfd0de",
"operator": "==",
"value": "recurring payment"
}
]
],
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"choices": {
"days": "day(s)",
"weeks": "week(s)",
"months": "month(s)"
},
"default_value": [],
"allow_null": 0,
"multiple": 0,
"ui": 0,
"return_format": "value",
"ajax": 0,
"placeholder": ""
},
{
"key": "field_5cf75be3fd0e2",
"label": "Total Occurrences",
"name": "my_land_payment_options_authorize_recurring_times",
"type": "number",
"instructions": "",
"required": 1,
"conditional_logic": [
[
{
"field": "field_5cf7598bfd0dd",
"operator": "==",
"value": "authorize"
},
{
"field": "field_5cf75a2dfd0de",
"operator": "==",
"value": "recurring payment"
}
]
],
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": 1,
"placeholder": "",
"prepend": "",
"append": "",
"min": 1,
"max": 9999,
"step": ""
},
{
"key": "field_5c6df879433e8",
"label": "Button Link",
"name": "my_land_payment_options_button_link",
"type": "url",
"instructions": "",
"required": 1,
"conditional_logic": [
[
{
"field": "field_5cf7598bfd0dd",
"operator": "!=",
"value": "authorize"
}
]
],
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": ""
}
]
}
],
"location": [
[
{
"param": "block",
"operator": "==",
"value": "acf\/rei-payment-options"
}
]
],
"menu_order": 0,
"position": "normal",
"style": "default",
"label_placement": "top",
"instruction_placement": "label",
"hide_on_screen": "",
"active": 1,
"description": "",
"modified": 1562225680
}
and this is post content block
{"id":"block_5c7f673b84e13","name":"acf/my-payment-options","data":{"field_5c36cf5487c08":{"row-0":{"field_5c36cf7387c09":"Cash Price","field_5c36cf8787c0a":"$8,999","field_5c36cf9f87c0b":"$12,999","field_5c6cc891d1407":"0","field_5c36cfae87c0c":"","field_5c36cfc287c0d":"Reserve Now","field_5cf7598bfd0dd":"authorize","field_5cf75a2dfd0de":"recurring payment","field_5cf75afcfd0df":"20","field_5d138724aaa98":"1","field_5cf75b5efd0e0":"days","field_5cf75be3fd0e2":"20"},"row-1":{"field_5c36cf7387c09":"Cash Price","field_5c36cf8787c0a":"$1234","field_5c36cf9f87c0b":"","field_5c6cc891d1407":"0","field_5c36cfae87c0c":"","field_5c36cfc287c0d":"Reserve Now","field_5cf7598bfd0dd":"authorize","field_5cf75a2dfd0de":"one time payment","field_5cf75afcfd0df":"2"}}},"align":"","mode":"preview"}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.