Michael Simpson
Forum Replies Created
-
Forum: Plugins
In reply to: [Contact Form DB] DB ranking by calculating difference of 2 number columnsRemove the “orderby” clause. This is re-sorting it after you numbered it. It is already being sorted by “SortByField” in the transform, followed by “AddRowNumberField” in the transform to number the rows based on that, then it gets re-sorted at the end by “orderby”
Sorry, width thing should be:
id="mytable" style="#mytable { width:100% }"Forum: Plugins
In reply to: [Contact Form DB] Make Link Clickable in in datatable1. https://cfdbplugin.com/?p=867
2. You will have to do something with css on that page, which is affected by your theme css. Maybe add to your shortcode
id="mytable" style="#mytable { width: 100% }"Forum: Plugins
In reply to: [Contact Form DB] DB ranking by calculating difference of 2 number columnsLooking at your link, it looks like the entries are correctly sorted by Dauer.
I don’t see the Rang column, which should display the ranking. I see you included it in “show” above, but I don’t see it on the page.
Aside:
width="100%"doesn’t do anything; I think you mean:style="width:100%;"Forum: Plugins
In reply to: [Contact Form DB] Maximum data export (Shortcode)Q1:
If you are talking a million entries, you might need more memory. It depends on #rows times #columns times how much data in each field.Q2:
If a person is logged in when he submits a form, then his login name is captured in the “Submitted Login” field.We can use CountField to count like below:
[cfdb-table form="YOUR-FORM" show="user,Submitted Login" trans="user=strval(Submitted Login)&&CountField(Submitted Login,user)&&SortByField(Submitted Login,DESC)" headers="Submitted Login=count"]add limit=”1″ to get just the top scorer.
In Trans:
– user=strval(Submitted Login) I create a copy of what is in “Submitted Login” as a new column “user”. Because I need two different column names in CountField (probably I should fix that code)
– CountField(Submitted Login,user) Counts the entries for each user. The count ends up in Submitted Login field.
https://cfdbplugin.com/?page_id=1167
– SortByField sorts by the count, descending so largest first
– “show” orders the columns
– “headers” renames “Submitted Login” to “count” to be less confusingForum: Plugins
In reply to: [Contact Form DB] Maintaining formatting from form to exportCFDB captures the string that FSCF sends for a date and does not try to infer its type. It is just a string. The export to .xlsx does not set the type of the data in the cells in Excel. Perhaps adding a transform to the export to format the date data to something that Excel will interpret as a date might help.
Forum: Reviews
In reply to: [Community Yard Sale] I would love an updated version of this.Update what, exactly?
Forum: Plugins
In reply to: [Contact Form DB] view imagesWas an error above. Instead do:
[cfdb-html form="miformulario" show="entidad,logo" search="tipo" filelinks="img"] ${logo} ${entidad} <br/> [/cfdb-html]Forum: Plugins
In reply to: [Contact Form DB] Is it possible to downoad the uploaded files directly?Let’s back up, if you have a form named “FORM” and a field called “UPLOAD” where people uploaded file, then you could put a shortcode on a page like:
[cfdb-html form="FORM" show="UPDLOAD" filelinks="link"] ${link} <br/> [/cfdb-html]Then you should have clickable links to uploaded files.
In the security settings, you would set “Can See Submission data when using shortcodes” to “Anyone” so you don’t need to login to see it.
Forum: Plugins
In reply to: [Contact Form DB] run php scriptYou could use a CF7 hook or a CFDB hook to inject PHP code during a form submission. In that, you could write code to calc checksum and add that value as a new field in the form submission.
In CFDB, see Manipulating data before it is saved
Forum: Plugins
In reply to: [Contact Form DB] Remove scroll bars from CFDB-HTMLI think you have to override those style either in you own style sheet or in the shortcode. Something like this might work:
[cfdb-table form="YOUR_FORM" id="mytable" style="#mytable td > div {max-height: none !important; overflow: none !important;}"Forum: Plugins
In reply to: [Contact Form DB] DB ranking by calculating difference of 2 number columnsno clue why people who arent logged into the WP admin cant access it
Security Settings: set “Can See Submission data when using shortcodes” to “Anyone”
Is it possible to have the field Platz (“Ranking”) that the shortest duration
I think you can do it by adding the following to the END of “trans”
&&SortByField(diff)&&AddRowNumberField(Platz)
(and you would NOT have a Platz field in the database. It is generated as shortcode output based on the sort order)I want to display a ranking list for each category seperately.
Use the same shortcode but add
tfilter="Geschlecht=weiblich"for example to only show women. You would repeat the shortcode to show a table for each category with tfilter set to select only what you want.Forum: Plugins
In reply to: [Add Shortcodes Actions And Filters] Add in Sidebar?I think this is a WordPress thing. If it does not execute shortcodes, then I don’t think there is anything we can do about it. Do regular shortcodes (not created with this plugin) work there?
Forum: Plugins
In reply to: [Contact Form DB] Show all shows only 100 entriesI’ll make those updates in the translation file.
Forum: Plugins
In reply to: [Contact Form DB] Edit submission on front-end doesn’t workIt looks like none of the Javascript is being loaded on the page. The shortcode tells WP that it needs some scripts loaded. But I think in this case, since the shortcode is being loaded in a round-about way, that by the time the shortcode is called, it is too late to add the scripts. So you don’t get any of the datatable decoration (like search field) or editability.
I think that if you look at the HTML for that page, you will NOT see “cfdb.edit.js” in it. But if you just put that shortcode directly in a post, then you do. Would you verify that hypothesis?
I’d have to work through this example and see if there is a way to make my plugin inject the scripts in that scenario.
Forum: Plugins
In reply to: [Contact Form DB] Better initial setup for better performanceGood points. Posting these as issues in GitHub will help me keep track of them.
https://github.com/mdsimpson/contact-form-7-to-database-extension/issues