Acf fields in handsontable's table

Tags: #<Tag:0x00007f452760afe0>

is there any way to display and interact with acf fields?and also I want to update data according to acf field type…

Hi @_asim

that plugin looks interesting. However, I did not have an opportunity to work on it. Do you know (and can share) details on how it returns the data that is typed? Handsontable has its own hooks on data edit so you will be able to update other components when you receive the call.

I have an object that returns from php , attached below , the [acfFields] of each index should be included in table , are you getting…

Array
(
[0] => WP_Term Object
(
[term_id] => 1161
[name] => …
[slug] => temp-138274569810
[term_group] => 0
[term_taxonomy_id] => 1161
[taxonomy] => category
[description] =>
[parent] =>
[count] => 0
[filter] => raw
[status] => active
[taxonomies] => Array
(
[0] => category
[1] => post_tag
[2] => product_cat
[3] => product_tag
[4] => pa_color
[5] => pa_size
)

        [allvalues] => Array
            (
                [0] => ...
            )

        [acfFields] => Array
            (
                [0] => Array
                    (
                        [ID] => 254
                        [key] => field_61b9d81b33ad8
                        [label] => Testing Color
                        [name] => testing_color
                        [prefix] => acf
                        [type] => color_picker
                        [value] => 
                        [menu_order] => 3
                        [instructions] => 
                        [required] => 0
                        [id] => 
                        [class] => 
                        [conditional_logic] => 0
                        [parent] => 248
                        [wrapper] => Array
                            (
                                [width] => 
                                [class] => 
                                [id] => 
                            )

                        [default_value] => 
                        [enable_opacity] => 0
                        [return_format] => string
                        [_name] => testing_color
                        [_valid] => 1
                    )

                [1] => Array
                    (
                        [ID] => 253
                        [key] => field_61b9c6ad13cb7
                        [label] => Testing Time
                        [name] => testing_time
                        [prefix] => acf
                        [type] => time_picker
                        [value] => 
                        [menu_order] => 2
                        [instructions] => 
                        [required] => 0
                        [id] => 
                        [class] => 
                        [conditional_logic] => 0
                        [parent] => 248
                        [wrapper] => Array
                            (
                                [width] => 
                                [class] => 
                                [id] => 
                            )

                        [display_format] => g:i a
                        [return_format] => g:i a
                        [_name] => testing_time
                        [_valid] => 1
                    )

                [2] => Array
                    (
                        [ID] => 252
                        [key] => field_61b9bab66f1fb
                        [label] => Testing Date Time
                        [name] => testing_date_time
                        [prefix] => acf
                        [type] => date_time_picker
                        [value] => 
                        [menu_order] => 1
                        [instructions] => 
                        [required] => 0
                        [id] => 
                        [class] => 
                        [conditional_logic] => 0
                        [parent] => 248
                        [wrapper] => Array
                            (
                                [width] => 
                                [class] => 
                                [id] => 
                            )

                        [display_format] => F j, Y g:i a
                        [return_format] => F j, Y g:i a
                        [first_day] => 1
                        [_name] => testing_date_time
                        [_valid] => 1
                    )

                [3] => Array
                    (
                        [ID] => 249
                        [key] => field_61b891644a6b3
                        [label] => Testing Date
                        [name] => testing_date
                        [prefix] => acf
                        [type] => date_picker
                        [value] => 
                        [menu_order] => 0
                        [instructions] => 
                        [required] => 0
                        [id] => 
                        [class] => 
                        [conditional_logic] => 0
                        [parent] => 248
                        [wrapper] => Array
                            (
                                [width] => 
                                [class] => 
                                [id] => 
                            )

                        [display_format] => F j, Y
                        [return_format] => F j, Y
                        [first_day] => 1
                        [_name] => testing_date
                        [_valid] => 1
                    )

            )

    )

[1] => WP_Term Object
    (
        [term_id] => 1160
        [name] => ...
        [slug] => temp-639849822604
        [term_group] => 0
        [term_taxonomy_id] => 1160
        [taxonomy] => category
        [description] => 
        [parent] => 
        [count] => 0
        [filter] => raw
        [status] => active
        [taxonomies] => Array
            (
                [0] => category
                [1] => post_tag
                [2] => product_cat
                [3] => product_tag
                [4] => pa_color
                [5] => pa_size
            )

        [allvalues] => Array
            (
                [0] => ...
            )

        [acfFields] => Array
            (
                [0] => Array
                    (
                        [ID] => 254
                        [key] => field_61b9d81b33ad8
                        [label] => Testing Color
                        [name] => testing_color
                        [prefix] => acf
                        [type] => color_picker
                        [value] => 
                        [menu_order] => 3
                        [instructions] => 
                        [required] => 0
                        [id] => 
                        [class] => 
                        [conditional_logic] => 0
                        [parent] => 248
                        [wrapper] => Array
                            (
                                [width] => 
                                [class] => 
                                [id] => 
                            )

                        [default_value] => 
                        [enable_opacity] => 0
                        [return_format] => string
                        [_name] => testing_color
                        [_valid] => 1
                    )

                [1] => Array
                    (
                        [ID] => 253
                        [key] => field_61b9c6ad13cb7
                        [label] => Testing Time
                        [name] => testing_time
                        [prefix] => acf
                        [type] => time_picker
                        [value] => 
                        [menu_order] => 2
                        [instructions] => 
                        [required] => 0
                        [id] => 
                        [class] => 
                        [conditional_logic] => 0
                        [parent] => 248
                        [wrapper] => Array
                            (
                                [width] => 
                                [class] => 
                                [id] => 
                            )

                        [display_format] => g:i a
                        [return_format] => g:i a
                        [_name] => testing_time
                        [_valid] => 1
                    )

                [2] => Array
                    (
                        [ID] => 252
                        [key] => field_61b9bab66f1fb
                        [label] => Testing Date Time
                        [name] => testing_date_time
                        [prefix] => acf
                        [type] => date_time_picker
                        [value] => 
                        [menu_order] => 1
                        [instructions] => 
                        [required] => 0
                        [id] => 
                        [class] => 
                        [conditional_logic] => 0
                        [parent] => 248
                        [wrapper] => Array
                            (
                                [width] => 
                                [class] => 
                                [id] => 
                            )

                        [display_format] => F j, Y g:i a
                        [return_format] => F j, Y g:i a
                        [first_day] => 1
                        [_name] => testing_date_time
                        [_valid] => 1
                    )

                [3] => Array
                    (
                        [ID] => 249
                        [key] => field_61b891644a6b3
                        [label] => Testing Date
                        [name] => testing_date
                        [prefix] => acf
                        [type] => date_picker
                        [value] => 
                        [menu_order] => 0
                        [instructions] => 
                        [required] => 0
                        [id] => 
                        [class] => 
                        [conditional_logic] => 0
                        [parent] => 248
                        [wrapper] => Array
                            (
                                [width] => 
                                [class] => 
                                [id] => 
                            )

                        [display_format] => F j, Y
                        [return_format] => F j, Y
                        [first_day] => 1
                        [_name] => testing_date
                        [_valid] => 1
                    )

            )

    )

)

and table is now in this position./

You can try to run the setDataAtCell() method within the batch() method when you get those data. If you use object data then it will be setDataAtRowProp()

reference
https://handsontable.com/docs/api/core/#setdataatcell
https://handsontable.com/docs/api/core/#setdataatrowprop
https://handsontable.com/docs/api/core/#batch