M
M
matros972020-04-13 20:13:10
WordPress
matros97, 2020-04-13 20:13:10

How to transfer from the front to the admin panel?

Hello, tell me how you can implement this, there is a shaggy data type reviews, two arbitrary fields are connected to it using ACF
1. - this is a rating number from 1 to 5
2.- id of the post to which the review is added.
And after filling it is necessary to transfer it to the admin panel. Can you please tell me if there is a plugin that can do this.

PS I originally thought to do this with a comment, but I can’t find a plugin that displays the rating (stars) and that it would be possible to edit them in the admin panel later.
If you tell me the plugin I will be grateful.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kotovvv, 2020-04-13
@kotovvv

You connect the plugin - ajax-manufactory
on the page where the data is (1,2) script

$('.field1').change(function(){jxAction('freiting', {'reting': $('.field1').val(),'post-id':$('.field2').val()})});

in function.php file
add_action('jx_freiting', function($jx){
update_field('name-field', $jx->data['reting'],$jx->data['post-id']);
});

where
- field1/2 - field class
- name-field - acf field

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question