Forum Replies Created
-
AuthorPosts
-
wgstjf
ParticipantHas there been any progress on this issue? Just come unstuck at this end because of it, nearly a year later.
Thanks,
Will
wgstjf
ParticipantWorth noting that this data is in a custom table and for a custom model not, as in your example, the postmeta table.
Thanks in advance.
Willwgstjf
ParticipantHi
I suppose what I'm asking is if slashes are present in the DB data should MB be stripping them before displaying the data in a input field? It is currently not happening at my end.
Cheers,
Will
wgstjf
ParticipantThe Text field in this case.
Thanks,
Will
wgstjf
ParticipantStill waiting for some news on this guys...can we have a reply at least to confirm that this issue's being addressed?
Cheers,
Will
wgstjf
ParticipantStill waiting for an update here guys...can we have a reply at least to confirm that this issue's being addressed?
Cheers,
Will
wgstjf
ParticipantHi Peter, any update on this?
Cheers,
Will
wgstjf
ParticipantHi Peter.
We are using the following to UPDATE the row.
$update_event = \MetaBox\CustomTable\API::update( $object_id, $table_name,$event_data);and then this to GET
$data = \MetaBox\CustomTable\API::get( $object_id, $table_name );Thanks
wgstjf
ParticipantHi Long
Thanks for your reply though I'm not sure I understand.
I need to be able to get the stored field's Value, for each select_advanced field within the cloneable group, and then do a DB lookup to get the Label (to display as the selected option) from a custom table.
In theory we could do something like this
// Field Option 'options' => get_current_option(currentValue), // Function function get_current_option(currentValue) { // DB Lookup to get Label for value... $example_label = 'Test; // Response return [currentValue => $example_label]; }The issue is I have no idea how to get the 'currentValue' var for the 'select_advanced' field in each of the cloneable groups. Any advice?
Cheers,
Will
wgstjf
ParticipantTHanks Long, much appreciated.
It would be great if they could also add in the ability to have custom bulk actions by modifying the get_bulk_actions() function in src/Model/ListTable.php to the following:
public function get_bulk_actions() { $actions = [ 'bulk-delete' => __( 'Delete', 'mb-custom-table' ), ]; $actions = apply_filters( "mbct_{$this->model->name}_bulk_actions", $actions ); return $actions; }It's been a while since there were updated to the MB Custom Table plugin - is it due for an update any time soon?
June 7, 2022 at 3:17 PM in reply to: Adding additional row actions using mbct_{$model}_row_actions #36354wgstjf
ParticipantThanks for that, really appreciate it. Any chance they can resolve this issue at the same time? https://support.metabox.io/topic/mbct_after_add-object_id-empty/#post-35871
Hope it's soon as we are working on a live project that needs this functionality. 🙂
Cheers,
Will
wgstjf
ParticipantHi,
Possible solution for the above issue...
public function insert_row( $row ) { global $wpdb; $id = isset( $row['ID'] ) ? $row['ID'] : null; do_action( 'mbct_before_add', $id, $this->table, $row ); $output = $wpdb->insert( $this->table, $row ); do_action( 'mbct_after_add', $wpdb->insert_id, $this->table, $row ); // Change $id to $wpdb->insert_id return $output; }wgstjf
ParticipantThank, I look forward to hearing how to get the ID of the just added item.
Cheers,
Will
wgstjf
ParticipantApologies, It was the mbct_after_add not mbct_after_update hook that had the issue. I referenced the wrong hook in the body of the original post
Would you mind checking again for me?
wgstjf
ParticipantHi guys,
Can we have some feedback on this please?
Cheers,
Will
-
AuthorPosts