Forum Replies Created
-
AuthorPosts
-
hannuh
ParticipantI got this working already.
September 2, 2021 at 6:10 PM in reply to: ✅Copying Group field entries from another custom post type? #30551hannuh
ParticipantThanks! Indeed that is one solution for this. One problem seems to be that as I have Block editor enabled, the custom post edit screen is not fully refreshing after clicking "Update" button, thus the newly copy pasted group values are not visible, it is bit ugly hack to manually need to hit Refresh for browser. Is there any solution for this? Thanks!
hannuh
Participantforeach ( $lomakkeet_template_fields as $single_field ) { $radio_fields = []; foreach ( $radio_fields as $single_radio_field ) { $radio_fields[] = array('field_name' => $single_radio_field); } $form_fields['sub_group_2'] = $radio_fields; } $all_tickets[$key]['sub_group_1'] = $form_fields; rwmb_set_meta( $post_id, 'main_group', $all_tickets );I have 3 nested groups, and I try to set in rwmb_after_save_post action hook with above (simplified version here) code, but it does not work properly, that $radio_fields part is not working. Should it work in theory like above for nested groups?
hannuh
Participantok thanks, this also fixes it:
.rwmb-field { max-width: 800px; }hannuh
ParticipantSorry I think you understood incorrectly. I'm not using metafields to store statistics. But I need unique id of each clone answer so that I can store the statistics of each answer to database table.
How do I get the hidden fields ID, can you give example? Thanks!
-
AuthorPosts