Skip to main content

Show Posts

This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.

Messages - sweetman

1
Questions / Problem uploading image
Hello all,
this worked fine until today, and no change to app or server in the last few months.
The problem: when I upload an image the progress bar over the thumbnail do not change to the checkmark.
Tried various image formats but no change.
Then I changed the image size and then it worked.
Is there any limitation to image upload (except the size you specify when building the app)?
TIA
tony
2
Bugs / Re: Chart Random Color not Working
You can achieve that by using custom code and adding field color to your table.
For example you table named status with the ff fields:
id
status
color


then you'll have to make a new file on the controllers folder.
let's name it ChartController with the ff code:

Code: [Select]
<?php


class ChartController  extends BaseController{

function StatusChart(){
$db = $this->GetModel();
$arr = array();
$sqltext = "select count(id) as value, status as label, color from status";
$queryparams = null;
$dataset1 = $db->rawQuery($sqltext, $queryparams);
$arr['labels']=array_map(function($var){ return $var['label']; }, $dataset1);
$arr['colors']=array_map(function($var){ return $var['color']; }, $dataset1);
                $arr['datasets'][] = array_map(function($var){ return $var['value']; }, $dataset1);
return $arr;
}

}

Then you'll have to supply the code above by

Code: [Select]
                           //Custom controller created
                           $cModel= new ChartController();
                           //Get the value of function status chart
                           $chartdata = $cModel->StatusChart();
                           //Supply the return value to the backgroundColor property.
                           backgroundColor:[
                           <?php echo json_encode($chartdata['colors']); ?>,
                            ]


P.S. sorry for my english
Sorry to be late, but now I badly need colors in charts.
Where have I to put the second block code ("you have to supply the code...")?
TIA
tony
3
Bugs / still no fix for chart colors?
Hello all,
charts without colors or with a single color are unusable, actually.
Is there a manual fix for this?
I badly need this.
Thanks
tony
4
Bugs / Bug in search results page
Hello all,
when I search for a term in a list view, something strange happens:
Before searching my URL is:
Code: [Select]
https://www.mysite.it/admin/registrations/
but after searching for something:
Code: [Select]
https://www.mysite.it/admin/registrations?search=something
Please note the missing SLASH.

Since in the list view there are image fields that point to a relative folder, image are missing until you change the URL to look like this:
Code: [Select]
https://www.mysite.it/admin/registrations/?search=something
(added the SLASH after "registration").
Once you add the SLASH images reappear.
Is there a way to fix this? Which file should I look at?
TIA
tony

5
Questions / How does multilanguage work?
Hello all,
one of my customer asked me to make the application interface multilanguage.
But how does the multilanguage option work in the project settings?
Or, is there a way to make a copy of a page (example: "copy of list page") and link it to another page (example: "copy of edit page")?
Or have I to create a new whole project and publish it somewhere else?
TIA
tony
8
Questions / [ADD RECORD PAGE] how to reference field from joined table on email
Hello all,
I need to send an emal after the user add a record to the application.
Actually I use the "Mail Actions Settings" to send the email.
I know how to reference the current record fields using the $modeldata[my_field] variable.
But how can I reference a value that is related to another table?

I.E.:
In my form I have a select field that gets values from another table.
So, my select looks like:
OPTION 1 (value: 1)
OPTION 2 (value: 2)
... and so on.

How can I reference the "OPTION 1" value instead of the "1" value in the email?
Is there a way to query the related table and get all fields from it?
TIA
tony

9
Issues / Re: Why not required field ...is required?
This problem is still unresolved.
And there is a problem even with required checkbox.

Example:
field1 (required): check1.3, check2.3, check1.3
field2 (required): check2.1, check2.2, check2.3

INSERT RECORD:
If you check:
field1: check1.3
field2: check2.3
the record is inserted

UPDATE RECORD:
If you update the record, even without changing the already checked checkboxes you cannot update it since it asks for you to check the requied checkboxes (bug: all unchecked checkboxes are set to required). The only way to fix this is check-unckeck at least one option for every field (time consuming and really bad for customers that will use the application).

THE PROBLEM:
In the UPDATE page all checkboxes that are not checked are set to required. Even if you have already checked one of them.

How can I fix it?
TIA
tony
 
12
Questions / Re: bar chart - how to sort and order correctly date by day?
Hi willvin, your query display the same results. After some other researches I found another way (subquery) to display the correct data. Here is my updated query for anyone having my problem:
Code: [Select]
SELECT *
FROM (
SELECT
COUNT(privacy_reg) AS registrati,
DATE_FORMAT(data_registrazione_reg, '%Y/%m/%d') AS datareg,
DATE_FORMAT(data_registrazione_reg, '%d/%m/%Y') AS datavis

FROM
registrazioni
GROUP BY
datareg
ORDER BY
datareg DESC
LIMIT 15
) as reg
ORDER BY
datareg ASC
I use the datavis column for my chart.

HTH
Tony
13
Questions / bar chart - how to sort and order correctly date by day?
Hello all,
I need to display registered users by day on a bar chart.
I can get the chart done, but the sorting is wrong.
I need to display the last 10 days in descendend order but the Mysql LIMIT function displays only the FIRST 10 records See image:

https://imgur.com/a/RwNZuuK

But how can I display the chart in reverse order (most recent on the right?)? Like this pic:

https://imgur.com/a/tUhXtzL

This is my MySQL code:
Code: [Select]
"SELECT  COUNT(r.privacy_reg) AS registrati, DATE_FORMAT(r.data_registrazione_reg, '%d/%m/%Y') AS data FROM registrazioni AS r GROUP BY data ORDER BY r.data_registrazione_reg DESC limit 10"

CAn someone help me?
TIA
tony