ACF relationship fields saving with Pro Form

Hello,
I’m using Pro Form to create post on frontend and I have relationship field with another post type - I’ve created function which returns post_id|post_title and user can choose from select field. Everything works as expected, I’ve just found a little problem.
ACF saves relational field as serialized array (example: * a:2:{i:0;s:2:”35″;}), in my function is just post_id, so frontend form saves post_id only (example: 35). When querying this relation field, serialized array needs this arg:

'meta_query' => array(
                                array(
                                    'key' => 'contractor', // name of custom field
                                    'value' => '"' . $post_id . '"', // matches exactly "35", not just 35. This prevents a match for "356"
                                    'compare' => 'LIKE'
                                )
                            )

and post_id this arg:

'meta_query' => array(
                                array(
                                    'key' => 'contractor', // name of custom field
                                    'value' =>  $post_id, // 35
                                    'compare' => '='
                                )
                            )

this is link to acf documentation

In my case, all posts are created with frontend form (and won’t be created in backend) and in query loops when using ‘compare’ => ‘=’, everything works as expected and I didn’t encounter any issues. But I really don’t know if this is right approach or if I’m creating problem for the future…
It’s just a small invoice creation project for my personal use - I wanted to learn more about wordpress - I’m self learner and not really experienced yet and I would like to ask your opinion Daniele (or anyone else). Thank you very much in advance.

Did you ever find a solution to this? I have a select element populated from a related table. When i select one or more entries from the sekect, it seems to update the back end, however if i open the post again on the front end, none of the select options are selected.
Many thanks
Pete

It works with just the post_id on my side. If it updates the backend, try clearing the cache in plugins and on the server side.

In your post meta submit action, did you remember to use :array in the form field? And what is the update type you’re using?

Yes