Alling buttons
This commit is contained in:
@@ -151,7 +151,8 @@ function go_form_get_custom_value($entry_id, $field_id)
|
||||
return $wpdb->get_var($wpdb->prepare(
|
||||
"SELECT value FROM {$wpdb->prefix}go_form_entry_custom_values
|
||||
WHERE entry_id = %d AND field_id = %d",
|
||||
$entry_id, $field_id
|
||||
$entry_id,
|
||||
$field_id
|
||||
));
|
||||
}
|
||||
|
||||
@@ -545,9 +546,11 @@ function go_form_update_entry()
|
||||
// Check if custom value exists
|
||||
$existing = go_form_get_custom_value($entry_id, $field->id);
|
||||
if ($existing !== null) {
|
||||
$wpdb->update("{$wpdb->prefix}go_form_entry_custom_values",
|
||||
$wpdb->update(
|
||||
"{$wpdb->prefix}go_form_entry_custom_values",
|
||||
['value' => $value],
|
||||
['entry_id' => $entry_id, 'field_id' => $field->id]);
|
||||
['entry_id' => $entry_id, 'field_id' => $field->id]
|
||||
);
|
||||
} else {
|
||||
$wpdb->insert("{$wpdb->prefix}go_form_entry_custom_values", [
|
||||
'entry_id' => $entry_id,
|
||||
|
||||
@@ -58,14 +58,13 @@
|
||||
<?php if ($show_admin): ?>
|
||||
|
||||
<td> <?= esc_html($e->rating) ?> </td>
|
||||
<td>
|
||||
<td style="white-space: nowrap;">
|
||||
<a href="<?= add_query_arg(array('page' => 'go-form-settings', 'form_id' => $form_id ?? 0, 'edit_entry' => $e->id), admin_url('admin.php')) ?>"
|
||||
class="button button-small">Edit</a>
|
||||
<?php action_button('go_form_delete_entry', 'Delete', 'Delete this entry?', $e->id); ?>
|
||||
class="button" style="margin-right: 4px;">Edit</a>
|
||||
<span style="display: inline-block;"><?php action_button('go_form_delete_entry', 'Delete', 'Delete this entry?', $e->id); ?></span>
|
||||
</td>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user