Forums

CF6 Database connection failed

Chris1984NRW 21 Sep, 2017
Hello,

i have problems with the component chronoforms v6 and joomla 3.

I would like to create a formular which read data from an database.

When i create an new form, I use read data.
but when i configure read data I cant choose a table, because the database connection failed:


When I create a new model, then I can choose a db table:


But when I apply the changes, get back to the designer and then get already back to the read data setup, the db connection failed again:


Does anyone knows an solution?

kind regards

Chris
Max_admin 29 Sep, 2017
Hi Chris,

This has already been fixed as per the patch sent by the email, correct ?

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 29 Sep, 2017
Hi Max,

thats right.

But I have Problems to get data results ^^

I would like to get the data from the Field spiel where aktiv=1 is.

How I have to config the read data to get this results?

I Need the results in a dropdown field
Max_admin 02 Oct, 2017
Hi Chris,

In the where conditions:
aktive:1

If you need one record only then set the "Select type" to "First matching", if you want the results in a dropdown then use the "Key/val pairs" option instead.

Then use {var:read_data_name} in the dropdown options box

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 21 Nov, 2017
Hi Max,

it works with the database table.
In the where conditions i add this.
now i get the error:
1054 Unknown column 'Model.spiel, aktiv' in 'field list'

What is wrong?
Can u help me again?
Chris1984NRW 22 Nov, 2017
I solved the problem.
I insert an debugger:
Array
(
[read_data19] => Array
(
[log] => Array
(
[0] => SELECT COUNT(`auswaertsspiele`.`spiel`) AS `auswaertsspiele.count` FROM `bvbsups_auswaertsspiele` AS `auswaertsspiele` WHERE `auswaertsspiele`.`aktiv` = '1';
[1] => SELECT `auswaertsspiele`.`spiel` AS `auswaertsspiele.spiel` FROM `bvbsups_auswaertsspiele` AS `auswaertsspiele` WHERE `auswaertsspiele`.`aktiv` = '1' ORDER BY `auswaertsspiele.spiel` ASC LIMIT 100;
)

[var] => Array
(
[0] => Array
(
[auswaertsspiele] => Array
(
[spiel] => Bayer Leverkusen - Borussia Dortmund (02.12.2017) | Fahrpreis: 16,- €
)

)

)

)

)

The result is correct. but how I get the result from the array into a dropbox?
I insert in the options {var: read_data19} but the dropbox is empty
Chris1984NRW 26 Nov, 2017
Answer
1 Likes
I had an Space by var: and read_data.
That was wrong.
Now in the dropbox shown "Array" but Not the result. What is the reason Max?
Max_admin 27 Nov, 2017
Hi Chris,

For the dropdown to be populated by the read data, the "read data" select type should be set to key/value pairs

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 27 Nov, 2017
Thanks, now I get the Array.
But in the dropbox was already shown one Array.
But I had 2 Arrays in my SQL database.
Debugger:
Array
(
[read_data19] => Array
(
[log] => Array
(
[0] => SELECT COUNT(`auswaertsspiele`.`spiel`) AS `auswaertsspiele.count` FROM `bvbsups_auswaertsspiele` AS `auswaertsspiele` WHERE `auswaertsspiele`.`aktiv` = '1';
[1] => SELECT `auswaertsspiele`.`aktiv` AS `auswaertsspiele.aktiv`, `auswaertsspiele`.`spiel` AS `auswaertsspiele.spiel` FROM `bvbsups_auswaertsspiele` AS `auswaertsspiele` WHERE `auswaertsspiele`.`aktiv` = '1' ORDER BY `auswaertsspiele.spiel` ASC LIMIT 100;
)

[var] => Array
(
[1] => TESTTEST!!!
)

)

[read_data25] => Array
(
[log] => Array
(
[0] => SELECT COUNT(`auswaertsspiele_einstiegsorte`.`einstiegsort`) AS `auswaertsspiele_einstiegsorte.count` FROM `bvbsups_auswaertsspiele_einstiegsorte` AS `auswaertsspiele_einstiegsorte` WHERE `auswaertsspiele_einstiegsorte`.`aktiv` = '1';
[1] => SELECT `auswaertsspiele_einstiegsorte`.`aktiv` AS `auswaertsspiele_einstiegsorte.aktiv`, `auswaertsspiele_einstiegsorte`.`einstiegsort` AS `auswaertsspiele_einstiegsorte.einstiegsort` FROM `bvbsups_auswaertsspiele_einstiegsorte` AS `auswaertsspiele_einstiegsorte` WHERE `auswaertsspiele_einstiegsorte`.`aktiv` = '1' ORDER BY `auswaertsspiele_einstiegsorte.einstiegsort` ASC LIMIT 100;
)

[var] => Array
(
[1] => Lüdenscheid Mitte (ehemals AVIS Center)
)

)

)


SQL Result in phpmyadmin:

SELECT `auswaertsspiele`.`aktiv` AS `auswaertsspiele.aktiv` , `auswaertsspiele`.`spiel` AS `auswaertsspiele.spiel`
FROM `bvbsups_auswaertsspiele` AS `auswaertsspiele`
WHERE `auswaertsspiele`.`aktiv` = '1'
ORDER BY `auswaertsspiele.spiel` ASC
LIMIT 100

auswaertsspiele.aktiv auswaertsspiele.spiel
1 Bayer Leverkusen - Borussia Dortmund (02.12.2017) ...
1 TESTTEST!!!
Chris1984NRW 30 Nov, 2017
I Change my db structure:


My read data;


My Dropdown:


In the dropdown, all four "einsteigsorte" should be displayed.
The form only displays "einstiegsorte1"


What did I wrong?
Any idea?
Chris1984NRW 06 Dec, 2017
No reply?
Its so difficult with chronoforms?
Funk001 08 Dec, 2017
Hi Chris,

I have been a system administrator for 15 years and I have the same problem but I do not understand it either
and the documetation suks

kind regards,
Rob Funk
GreyHead 08 Dec, 2017
Hi Chris,

The note in the Select type box says that to "Return an array of key/value pairs, two fields must be provided" I understand this to mean that it will return a key and a value from each selected row of the table.

BUT your table is not set up in this way, you have all the values you want returned in the same table row. So you need to set Select Type to "First matching record" that will read the data you want - but it will not be in the correct format to use in the dropdown - you can fix that easily enough using a Custom Code action to convert the single data array returned which is like array('value1', 'value2', . . .) into the required format of array( array('value1', 'value1'), array(value2', value2), . . . )

Bob
Chris1984NRW 11 Dec, 2017
Hi Bob,

Thanks for your response.

Can you tell me an example code?
I dont know i can do this
Chris1984NRW 03 Jan, 2018
I am now very frustrated that I can not get help.

Without a solution CF6 is useless for me!
Chris1984NRW 03 Jan, 2018
When you tell me a way to fix it, i would like to Change the db structure.
GreyHead 03 Jan, 2018
Hi Chris,

Sorry that Max hasn't replied to you - I know little about CFv6 so far and have been away over the holidays.

The code you need would be something like this
<?php
$old_array = $this->data['some_name'];
$new_array = array();
foreach ( $old_array as $v ) {
  $new_array[$v] = $v;
}
$this_data['some_name'] = $new_array; 
?>


Bob
Chris1984NRW 08 Jan, 2018
<?php
$old_array = $this->data['read_data25'];
$new_array = array();
foreach ( $old_array as $v ) {
$new_array[$v] = $v;
}
$this_data['read_data25'] = $new_array;
?>

So?
GreyHead 08 Jan, 2018
Hi Chris,

I learned a bit more about CFv6 over the weekend and - with some help from the Manual and some prompting from Max I got code like this to work on another site.
<?php
$old_array = $this->get('read_data25', array());
$new_array = array();
foreach ( $old_array as $v ) {
  $new_array[$v] = $v;
}
$this->set('read_data25', $new_array); 
?> 

Bob
Chris1984NRW 08 Jan, 2018
I fill in a custom Code in the load event after the read_data25 Event
And what I fill in in the Options field? {var:read_data25}?
Max_admin 08 Jan, 2018
Hi,

If your options are in the same table row and your "select type" is set to "first matching record" then the row fields need to be converted into a new array, the code posted by Bob should work but needs a small change:

<?php
$old_array = $this->get('read_data25.MODEL_NAME', array());
$new_array = array();
foreach ( $old_array as $v ) {
$new_array[$v] = $v;
}
$this->set('read_data25', $new_array); 
?>

The custom code action should be after the "data read" and before the "display section".

Then you can use {var:read_data25} in the options fields.

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 08 Jan, 2018
But when I choose First Matchng record, then only One result would be displayed, right?

But when more then One Game is active, These Games must be displayed
Chris1984NRW 12 Jan, 2018
Hi Max,

I create the custom Code before the Display section:


The Detail of the custom Code:


I only get an Array as option


Here is the detailed view for read_data:


what is the error?
Max_admin 15 Jan, 2018
Hi Chris,

Sorry, the code needs a change:

foreach ( $old_array as $k => $v ) {
$new_array[$k] = $v;
}

Then use {var:read_data25} in the options box!

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 16 Jan, 2018
Same result.
Do you Need an account to check this directly in my joomla?
Max_admin 18 Jan, 2018
Hi Chris,

Please add a debugger before the "read data" and another after the "read data" and post the results.

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 19 Jan, 2018
Debugger before read_data:
Array
(
[option] => com_chronoforms6
[cont] => manager
[chronoform] => anmeldungfahrten
[__utma] => 13686116.284627528.1480674891.1502691711.1502693934.6
[__utmz] => 13686116.1502182504.2.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
[phpbb3_kfo3u_k] =>
[phpbb3_kfo3u_u] => 459
[phpbb3_kfo3u_sid] => 2cbff43e31d9f8cd25db86507a6f014e
[1c7086c6490ea10cfedce69e211ed009] => 9d7246da8801d3d7aa2cab25e29e79f8
)


Debugger after read_data:
Array
(
[read_data19] => Array
(
[log] => Array
(
[0] => SELECT COUNT(`auswaertsspiele`.`spiel`) AS `auswaertsspiele.count` FROM `bvbsups_auswaertsspiele_neu` AS `auswaertsspiele` WHERE `auswaertsspiele`.`aktiv` = '1';
[1] => SELECT `auswaertsspiele`.`spiel` AS `auswaertsspiele.spiel` FROM `bvbsups_auswaertsspiele_neu` AS `auswaertsspiele` WHERE `auswaertsspiele`.`aktiv` = '1' ORDER BY `auswaertsspiele.spiel` ASC LIMIT 100;
)

[var] => Array
(
[ewrewr] => ewrewr
)

)

[read_data25] => Array
(
[log] => Array
(
[0] => SELECT COUNT(`auswaertsspiele_einstiegsorte`.`spiel`) AS `auswaertsspiele_einstiegsorte.count` FROM `bvbsups_auswaertsspiele_neu` AS `auswaertsspiele_einstiegsorte` WHERE `auswaertsspiele_einstiegsorte`.`aktiv` = '1';
[1] => SELECT `auswaertsspiele_einstiegsorte`.`einstiegsort1` AS `auswaertsspiele_einstiegsorte.einstiegsort1`, `auswaertsspiele_einstiegsorte`.`einstiegsort2` AS `auswaertsspiele_einstiegsorte.einstiegsort2`, `auswaertsspiele_einstiegsorte`.`einstiegsort3` AS `auswaertsspiele_einstiegsorte.einstiegsort3`, `auswaertsspiele_einstiegsorte`.`einstiegsort4` AS `auswaertsspiele_einstiegsorte.einstiegsort4` FROM `bvbsups_auswaertsspiele_neu` AS `auswaertsspiele_einstiegsorte` WHERE `auswaertsspiele_einstiegsorte`.`aktiv` = '1' LIMIT 100;
)

[var] => Array
(
[auswaertsspiele_einstiegsorte] => Array
(
[einstiegsort1] => ort1
ort2
ort3
ort4
[einstiegsort2] => ort2
[einstiegsort3] => ort3
[einstiegsort4] => ort4
)

)

)

)
Max_admin 19 Jan, 2018
Hi Chris,

Sorry, I wanted to say one before the PHP action and another after it.

Also why do you have multiple values in the "einstiegsort1", your end goal is to have 4 options in the dropdown, one for each "einstiegsort", correct ?

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 25 Jan, 2018
Hi Chris,

Good, now if you use {var:read_data25.auswaertsspiele_einstiegsorte} in the options box of the dropdown after the new code is used then you should get 4 options loaded, is this correct ?

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 29 Jan, 2018
Hi Max,

thanks, now its run.

But now when I choose a game in the first dropbox, in the second dropbox always shown the "einstiegsorte" from the first db entry.
It is possible when I choose a game the second dropdown with "einstiegsorte" load the correct "einstiegsorte"?
Max_admin 29 Jan, 2018
Hi Chris,

But the 4 options are loaded in the 2nd dropdown or not ?

If they are then you can add some code to auto select the value you need, how do you choose the correct ort ?

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 30 Jan, 2018
Hi Max,

yes, the 4 Option are displayed.
But only from one game. When i choose a game the correct Option must be load.
Where can I place the Code and what Kind of Code?

Regards

Chris
Max_admin 30 Jan, 2018
Hi Chris,
To be user we are on the same page, you want the correct value to be selected from the 4, correct ? or you want other values to be available too ?
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 31 Jan, 2018
Hi Max,here is my db structure

I have tweo drop boxes. In the first dropbox are the games
in the second "einstiegsorte"
when i choose a game. the secound dropbox must shown the correct einstiegsorte to the game
Max_admin 31 Jan, 2018
Hi Chris,
Ok, in the "read data" Where conditions you must add the following:
spiel:{data:spiel_field_name}
aktiv:1
Are you doing that ?
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 01 Feb, 2018
Yes, now I get the error:
1054 Unknown column 'auswaertsspiele_einstiegsorte.aktiv' in 'where clause'

my where condition:
spiel:{data:spiel}
aktiv:1
Max_admin 04 Feb, 2018
Hi Chris,
Please post a screenshot of your current read_data settings
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 05 Feb, 2018
I got this failure also when i Delete the new where clause
Chris1984NRW 05 Feb, 2018
I fix it. Here are the new db_data:
Chris1984NRW 05 Feb, 2018
Now I get an empty site. No fields shown
Max_admin 06 Feb, 2018
Hi Chris,
The error notes that no "aktiv" field exists in the table, so adding "spiel" is not supposed to solve it, do you have "aktiv" placed in other settings ?
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 06 Feb, 2018
Hi Chris,
The error notes that no "aktiv" field exists in the table, so adding "spiel" is not supposed to solve it, do you have "aktiv" placed in other settings ?
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 06 Feb, 2018
Hi Chris,
The error notes that no "aktiv" field exists in the table, so adding "spiel" is not supposed to solve it, do you have "aktiv" placed in other settings ?
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 10 Feb, 2018
aktiv exists in the db. See the Picture in this Thread from my db structure.

Why i get an empty site when i set the following where condition:

spiel:{data:field_select1}

aktiv:1
Max_admin 10 Feb, 2018
Hi Chris,

Your select type is set to "first matching" ? what happens when you use the first condition only:
spiel:{data:field_select1}
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 10 Feb, 2018
Hi Max

the same result. Empty site
Max_admin 10 Feb, 2018
Hi Chris,

Empty site mean a full blank page or an empty list/form ? does the debug show any info ?

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 10 Feb, 2018
Hi Max,
empty form. The Joomla site would shown. But not the form.
Debug at the start in db_read_data_25 in the sector found dont shown
Max_admin 10 Feb, 2018
Hi Chris,

Please add a debugger just after the "Read data" what are the results displayed ?

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 12 Feb, 2018
I set a Debugger in the not found sector:[read_data25] => Array
(
[log] => Array
(
[0] => SELECT COUNT(`auswaertsspiele_einstiegsorte`.`spiel`) AS `auswaertsspiele_einstiegsorte.count` FROM `bvbsups_auswaertsspiele_neu` AS `auswaertsspiele_einstiegsorte` WHERE `auswaertsspiele_einstiegsorte`.`spiel` = '' AND `auswaertsspiele_einstiegsorte`.`aktiv` = '1';
[1] => SELECT `auswaertsspiele_einstiegsorte`.`einstiegsort1` AS `auswaertsspiele_einstiegsorte.einstiegsort1`, `auswaertsspiele_einstiegsorte`.`einstiegsort2` AS `auswaertsspiele_einstiegsorte.einstiegsort2`, `auswaertsspiele_einstiegsorte`.`einstiegsort3` AS `auswaertsspiele_einstiegsorte.einstiegsort3`, `auswaertsspiele_einstiegsorte`.`einstiegsort4` AS `auswaertsspiele_einstiegsorte.einstiegsort4` FROM `bvbsups_auswaertsspiele_neu` AS `auswaertsspiele_einstiegsorte` WHERE `auswaertsspiele_einstiegsorte`.`spiel` = '' AND `auswaertsspiele_einstiegsorte`.`aktiv` = '1' LIMIT 100;
)

[var] =>
)

WHERE `auswaertsspiele_einstiegsorte`.`spiel` is empty. this is the Problem. But how can I fix this?

Max_admin 12 Feb, 2018
Hi Chris,

Sorry, the {data} should be {data:select1} because you should use the field name inside the tags.

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 12 Feb, 2018
Hi Chris,

There is no guarantee that this will fix it, but how was the debug changed with this change ?

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 12 Feb, 2018
[read_data25] => Array
(
[log] => Array
(
[0] => SELECT COUNT(`auswaertsspiele_einstiegsorte`.`spiel`) AS `auswaertsspiele_einstiegsorte.count` FROM `bvbsups_auswaertsspiele_neu` AS `auswaertsspiele_einstiegsorte` WHERE `auswaertsspiele_einstiegsorte`.`spiel` = '' AND `auswaertsspiele_einstiegsorte`.`aktiv` = '1';
[1] => SELECT `auswaertsspiele_einstiegsorte`.`einstiegsort1` AS `auswaertsspiele_einstiegsorte.einstiegsort1`, `auswaertsspiele_einstiegsorte`.`einstiegsort2` AS `auswaertsspiele_einstiegsorte.einstiegsort2`, `auswaertsspiele_einstiegsorte`.`einstiegsort3` AS `auswaertsspiele_einstiegsorte.einstiegsort3`, `auswaertsspiele_einstiegsorte`.`einstiegsort4` AS `auswaertsspiele_einstiegsorte.einstiegsort4` FROM `bvbsups_auswaertsspiele_neu` AS `auswaertsspiele_einstiegsorte` WHERE `auswaertsspiele_einstiegsorte`.`spiel` = '' AND `auswaertsspiele_einstiegsorte`.`aktiv` = '1' LIMIT 100;
)

[var] =>
)

)
Max_admin 17 Feb, 2018
Hi Chris,

The debug reads this:
WHERE `auswaertsspiele_einstiegsorte`.`spiel` = '' AND `auswaertsspiele_einstiegsorte`.`aktiv` = '1'
So it tries to find records with "spiel" is empty, if there are no records like so then it will not return any results.

Your where conditions are set to spiel:{data:select1} ? and you actually have a field named "select1" and you can view its value in the debug report ?

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 20 Feb, 2018
My where conditions are:spiel:{data:field_select1}
aktiv:1


Max_admin 20 Feb, 2018
Hi Chris,

Wrong, the field name is "spiel" and so you must use:
spiel:{data:spiel}
And your "Selected values" are also not correct, it should be multiline

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 06 Mar, 2018
Hi Max,

that doesnt help:
Array
(
    [option] => com_chronoforms6
    [cont] => manager
    [chronoform] => anmeldungfahrten
    [__utma] => 13686116.284627528.1480674891.1502691711.1502693934.6
    [phpbb3_kfo3u_k] => 
    [phpbb3_kfo3u_u] => 1
    [phpbb3_kfo3u_sid] => f526229bdb02068f55dc128c8b7eb643
    [1c7086c6490ea10cfedce69e211ed009] => a17ffdceb621949ce1d4ef0748af7d0d
)
Array
(
    [read_data19] => Array
        (
            [log] => Array
                (
                    [0] => SELECT COUNT(`auswaertsspiele`.`spiel`) AS `auswaertsspiele.count` FROM `bvbsups_auswaertsspiele_neu` AS `auswaertsspiele` WHERE `auswaertsspiele`.`aktiv` = '1';
                    [1] => SELECT `auswaertsspiele`.`spiel` AS `auswaertsspiele.spiel` FROM `bvbsups_auswaertsspiele_neu` AS `auswaertsspiele` WHERE `auswaertsspiele`.`aktiv` = '1' ORDER BY `auswaertsspiele.spiel` ASC LIMIT 100;
                )

            [var] => Array
                (
                    [ewrewr] => ewrewr
                    [test] => test
                )

        )

)
Array
(
    [option] => com_chronoforms6
    [cont] => manager
    [chronoform] => anmeldungfahrten
    [__utma] => 13686116.284627528.1480674891.1502691711.1502693934.6
    [phpbb3_kfo3u_k] => 
    [phpbb3_kfo3u_u] => 1
    [phpbb3_kfo3u_sid] => f526229bdb02068f55dc128c8b7eb643
    [1c7086c6490ea10cfedce69e211ed009] => a17ffdceb621949ce1d4ef0748af7d0d
)
Array
(
    [read_data19] => Array
        (
            [log] => Array
                (
                    [0] => SELECT COUNT(`auswaertsspiele`.`spiel`) AS `auswaertsspiele.count` FROM `bvbsups_auswaertsspiele_neu` AS `auswaertsspiele` WHERE `auswaertsspiele`.`aktiv` = '1';
                    [1] => SELECT `auswaertsspiele`.`spiel` AS `auswaertsspiele.spiel` FROM `bvbsups_auswaertsspiele_neu` AS `auswaertsspiele` WHERE `auswaertsspiele`.`aktiv` = '1' ORDER BY `auswaertsspiele.spiel` ASC LIMIT 100;
                )

            [var] => Array
                (
                    [ewrewr] => ewrewr
                    [test] => test
                )

        )

    [read_data25] => Array
        (
            [log] => Array
                (
                    [0] => SELECT COUNT(`auswaertsspiele_einstiegsorte`.`spiel`) AS `auswaertsspiele_einstiegsorte.count` FROM `bvbsups_auswaertsspiele_neu` AS `auswaertsspiele_einstiegsorte` WHERE `auswaertsspiele_einstiegsorte`.`spiel` = '' AND `auswaertsspiele_einstiegsorte`.`aktiv` = '1';
                    [1] => SELECT `auswaertsspiele_einstiegsorte`.`einstiegsort1` AS `auswaertsspiele_einstiegsorte.einstiegsort1`, `auswaertsspiele_einstiegsorte`.`einstiegsort2` AS `auswaertsspiele_einstiegsorte.einstiegsort2`, `auswaertsspiele_einstiegsorte`.`einstiegsort3` AS `auswaertsspiele_einstiegsorte.einstiegsort3`, `auswaertsspiele_einstiegsorte`.`einstiegsort4` AS `auswaertsspiele_einstiegsorte.einstiegsort4` FROM `bvbsups_auswaertsspiele_neu` AS `auswaertsspiele_einstiegsorte` WHERE `auswaertsspiele_einstiegsorte`.`spiel` = '' AND `auswaertsspiele_einstiegsorte`.`aktiv` = '1' LIMIT 100;
                )

            [var] => 
        )

)
Max_admin 06 Mar, 2018
Hi Chris,

Where do you have the read data action ? there is no field called "spiel" in the data array before the debug!

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 07 Mar, 2018
And this is in the "submit" event ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 07 Mar, 2018
Then the {data:spiel} has no value, unless you pass it to the form in the url:
&spiel=xxx
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 09 Mar, 2018
and how do I get the first value in the URL?
Max_admin 10 Mar, 2018
Hi Chris,

Do you have a specific value for "spiel" which you want to use by default ? if yes then you can modify the conditions:
spiel:{data:spiel/default_value}
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 10 Mar, 2018
Hi Max

no because i have several Spiele in the database where aktiv=1.
The values changes because One Game is only active for few weeks.
Max_admin 11 Mar, 2018
Hi Chris,

Ok, then you better pass the spiel value to the form in the url if you are going to do the check on form load, if you copy the form link from the "view" link in the forms manager then you can add &spiel=value to the url and use that with the updated condition syntax above.

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 14 Mar, 2018
Hi Max,

can you show me this in detail or on my screenshots?
Max_admin 15 Mar, 2018
Hi Chris,

Please copy and paste here the form link from the "View" link in the forms manager!

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 19 Mar, 2018
Hi Chris,

So you will need a link like this:
http://bvb-supporters-lennetal.de/administrator/index.php?option=com_chronoforms6&cont=manager&chronoform=anmeldungfahrten&spiel=whatever
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 19 Mar, 2018
Hi Max,
a permanent link doesnt work because the games changes.
I Dont understand the Problem from chronoforms.

In version 4 I also had a drop down element where I have read several games that are active.
Why is not that easy in version 6?
Why do I have to give the values here via links?

It must be possible to read values from a database subject to a specific condition.

Then there is the possibility to set up a change event during the drowdown.
Here you would have to be able to create an event, which then loads the appropriate entry-level.

I have a feeling that the v4 is easier than the v6.
Max_admin 20 Mar, 2018
Hi Chris,

I understand that you want to "filter the results" on form "load" based on the value of the field "spiel", which has different values, and so you need to provide the filter value somehow.

if you want to do the filtering AFTER the form is sent then no problems with that, you can use the value of the form field for filteration.

Do you have a link to the v4 form ?

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 21 Mar, 2018
Hi Max,
I want to do the filtering AFTER the form is load and BEFORE the form is sent.

The v4 form doenst longer exist because I install joomla vo
new with v6
Max_admin 22 Mar, 2018
Hi Chris,

So how did you get the value of spiel in your v4 form ? what is the link to the v4 form ?

You may build a multipage form, in the first page you ask the user for the spiel value, in the 2nd page you display the main form.

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 22 Mar, 2018
Hi Max,

very good idea with the multipage form.
Can you tell me the exactly link where is the actual value from spiel which will be send?
I think I have to create a custom html with the link to the second form?
Max_admin 23 Mar, 2018
Hi Chris,

You do not need a link, you need a dropdown on the first page, field name = "spiel", with the values you want to use for filtering, then use the conditions I posted earlier, including:
spiel:{data:spiel}
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 23 Mar, 2018
Hi Max,
I have create a multipage form by the tutorial.
On the first page the user can choose the game. on the second the user write his data in the form.
the correct einstiegsorte shown in the dropbox.

All fine!

BUT: in the display section two, i take submit as the event.
but by click on the button on the second form site, the first form site would be shown.

what is the error?
Chris1984NRW 23 Mar, 2018
Some informations for you
i have the following events:
- load
- page2
- submit

the display sections has following events:
- load: page2
- page2: submit

designer has following sections:
- one
- two
Max_admin 24 Mar, 2018
Hi Chris,

You mean that when you click the button on page2, you are sent back to the load event ? if yes then are you sure this is a submit button you have ? or a link ?

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 24 Mar, 2018
Hi Max,

yes.


And is a button
Max_admin 25 Mar, 2018
Hi Chris,

If you have the "submit event" in the "Display section" inside "page2" set to "submit" then this should not be happening, unless you have a field named "event" on that page.

If this is not the case then please post a link to the form.

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 25 Mar, 2018
Hi Max,

in the display section in the page2 sector the event is submit. Please show my answer earlier.
And i dont have an field named event.

Here is the link to the form http://bvb-supporters-lennetal.de/index.php/b
Max_admin 25 Mar, 2018
Hi Chris,

That is caused by the "Validate fields" action, you will need to set the "event loader" inside it to load the event "page2" on fail instead.

Another problem, your template loads its own jQuery version after other scripts has been loaded, this breaks some code on the page including the Chronoforms validtaion, this should be fixed.

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 25 Mar, 2018
I have found the mistake. I dont have to set required by the drobbox on the first page.

but I find the next error.
When I get an error that a field is empty or the security image is not correct, so he get back to the first page and not to the page2.

how can i solved this?
Chris1984NRW 25 Mar, 2018
Hi Max,

I has already an event loader in the sector validate fields. But the event was on load and not on page 2. that was the mistake. but now by an error the page2 would be load but without any fields.
on the first page I got this error
  • One element is not displayed on the frontend because the extension is not validated.
And how can I fix the jquery problem?
GreyHead 25 Mar, 2018
Hi Chris,

The message you have is because you are using the free version of ChronoForms which is limited in the number of element that can be displayed in the front end.

Bob
Chris1984NRW 25 Mar, 2018
Hi Bob,

since yesterday i dont add more elemts in the form. and yesterday I dont get this message
Chris1984NRW 25 Mar, 2018
Ok I delete an element which I dont need.
the error doesnt shown no longer.

but what is the mistake with the empty page2 after validate fields fail?

and one more question:
I would like to send the data via mail.
all fields are included, but not the value of spiel.
I add in the content of mail {data:spiel}
but in the mail the value is empty. what is the reason?
Max_admin 26 Mar, 2018
Hi Chris,

Your validation is still broken because of the javascript error.

The value of "spiel" will need to be stored in session because it's on the first page of the form, but its more important to fix the javascript problem.

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 26 Mar, 2018
Hi Max

And how i can fix this?
Chris1984NRW 26 Mar, 2018
Hi Max,
I disable jquery in the template.
Validate fields run correct.

but not when the user make the Google captcha security test.
If this not activated by user I get an empty form with the error message.
Max_admin 30 Mar, 2018
Hi Chris,

The Google captcha has no validation, if not provided the form will reload.

Now you can pass the spiel field, you can add a hidden field named "spiel" in page2, and that will include the field value in the email, no need to save it in the session this way.

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 30 Mar, 2018
Hi Max,

I dont know what you mean with the recaptcha. You have a link to my form. Please test it.

I have Text Field with the value.
You can see it on page 2
Max_admin 04 Apr, 2018
Hi Chris,

What are the current issues exactly ? the field "spiel" value in not included in the email ? if yes then just add a field named "spiel" to the 2nd page, you can make it a text field or a hidden field, whatever you prefer.

Does this work ?

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Chris1984NRW 04 Apr, 2018
Hi Max

I had a Field with the spiel value in the 2nd Page. You can see it in the top of the 2nd page.

But in the mail the value is empty
Chris1984NRW 10 Apr, 2018
Hi Max,

No idea?

Regards

Chris
Chris1984NRW 24 Apr, 2018
Hey

Im really frustrated that i dont get an answer 😟
GreyHead 25 Apr, 2018
Hi Chris1984NRW,

"I had a Field with the spiel value in the 2nd Page. You can see it in the top of the 2nd page."

That isn't a 'field' it's just an HTML snippet to display the value. Please try Max's suggestion to add a Hidden Input named 'spiel' in the second page.

Bob
Chris1984NRW 26 Apr, 2018
Hi Bob,I Change it and now it is a text field, which is disabled. But this field doesnt shown in the mail. is the reason that the field is disabled?

Chris
healyhatman 02 May, 2018
Disabled fields aren't sent when a form is posted. That's normal HTML behaviour. You need the Hidden Field you were asked to use.
Chris1984NRW 12 May, 2018
Thanks!! That was the solution
The Form is ready 🙂
This topic is locked and no more replies can be posted.