kentauron
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Data Access – App, Table, Form and Chart Builder plugin] File uploadThank you so much! I’ll let you know if needed ??
It was not an issue of this plugin
Good news!
Thank you
I successfully did it, but modifying a lot the code of the plugin, by adding part of the code taken by the above mentioned example and adding a new arg to define which fields will use “select formatter” and the queries to get data that will populate those lists, something like this:
‘selects’ => ‘fieldx:SELECT id, fieldname FROM wda_table1 ORDER BY fieldname ASC;fieldy:SELECT id, fieldname2 FROM wda_table2 ORDER BY fieldname2 ASC’Forum: Plugins
In reply to: [WP Data Access – App, Table, Form and Chart Builder plugin] Grid editingHi,
(1) I like that dashboard (maybe I found a little bug in designer, when you change name and type for a field, that field moves at the end of the table, and designer still show it at the right place, so you need to reconcile the table)
(2) WP-DB-Table-Editor adds menu to tables on the dashboard, and so far I’m working with it; I’ve already modified it to do almost all what I need, included the relations between tables and the dropdown and autocomplete. Maybe I’ll do a fork from it to do my own plugin; with slickgrid you can do almost anything, now I working on pdf output
Thank you again
Forum: Plugins
In reply to: [WP-DB-Table-Editor] ‘default_values’ not workingThere was an error in writing the arg, no bug.
‘default_values’ arg works fineForum: Plugins
In reply to: [WP-DB-Table-Editor] ‘default_values’ not workingAnyway for on of my needs (add the current username to a field) I added a new argument to the plugin code: $current_user_column (on class DBTableEditor)
and after the no_edit_cols check “if($no_edit_cols){“, the following code to add the current username in that hidden field:$current_user = $cur->current_user_column;
if(is_string($current_user)) $current_user=explode(‘,’,$current_user);
if($current_user){
foreach($current_user as $c_user){
$wp_current_user = wp_get_current_user();
$up[$c_user] = $wp_current_user->display_name;
}
}- This reply was modified 5 years, 5 months ago by kentauron.
Forum: Plugins
In reply to: [WP-DB-Table-Editor] ‘default_values’ not workingWhen ‘default_values’ is set no new row is created when you start to edit the last blank row
There are same working examples, like this one:
https://github.com/6pac/SlickGrid/blob/master/examples/example-select2-editor.htmlBut my issue is how to pass ‘formatter’, ‘editor’ and ‘datasource’, to send something like this:
{id: “CountryOfOrigin”, name: “Country Of Origin”, field: “country”, minWidth: 200, formatter: Select2Formatter, editor: Select2Editor, dataSource: countryIsoAndNameList }I think that plugin code needs to be modified to do that(?)
Forum: Plugins
In reply to: [WP-DB-Table-Editor] ‘default_values’ not workingMaybe the real issue is that a new row is not created, so what edited flushes away
Perfect!
About storing, now I can edit each time that file, but it could be useful to add some hook or call to generic dosomething function before and after data are stored.
About editing, common users will see and can edit only their own recs so I can use $$USER$$ where clause.
Thank you for your very fast and valid support
Hidden, user not allowed to change it, no history needed. Each user edit only his records.
That’s why as a work around I wanted to add it via php, calling a function before data are saved to db.I need to know which user added each record, so I’d like to store its name/ID in a field
- This reply was modified 5 years, 5 months ago by kentauron.
Forum: Plugins
In reply to: [WP Data Access – App, Table, Form and Chart Builder plugin] File uploadGreat!
Thank you for that and the quick answer too!