Nothing should be changed if your "data provider" in "Save data" is {data:}
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Well except it should be $this->data("field") not $form->data["field"]
Not sure but you can use a v6 Read Data for that!
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
$this->data("field") not square brackets. It's a function, not an array.
$this->data("field") not square brackets. It's a function, not an array.
its both actually!🙂
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
I reject your reality and substitute my own
Also OP just do it in a read data action
Hi,
many thanks for the info.
I also tried "read data".
read_data20
Model: Data20
DB-table: mtb_blaetter
Select type: Return an array of key...
Fields to retrieve: mtb
in the dropdown:
name: Article[addresstext]
ID: addresstext
Option:
=auswählen
{var:read_data20}
The dropdown will show the correct list (mtb) as a selection.
If I select "mtb", then "mtb" will be stored correctly in the database.
When I put in "read_data" in "Fields to retrieve":
mtb
lat
lon
I'll be in the dropdown mtb, lat, lon displayed. But I would like to have only "mtb" to choose from.
I have 2 hidden fields for "lat" and "lon" in form where these values could be inserted and stored in the database. Has not worked yet.
I tried 2 dropdown events but did not work either.
I thought 2 events in dropdown might work:
Triggering event: Change
Triggering action: z.B. Reload oder Add to oder Function
Possible values: lat
Affected elements: hidden94 (is the ID from hiddenfield, Name: Article[latitude], Value: {var:read_data20})
Triggering event: Change
Triggering action: z.B. Reload oder Add to oder Function
Possible values: lon
Affected elements: hidden95 (is the ID from second hiddenfield, Name: Article[longitude], Value:{var:read_data20})
I did not get it though.
I'm really struggling to understand what you're trying to achieve.
:-)
I have a table "mtb_blaetter" with the columns: mtb, lat, lon
If I select a value from the column "mtb" in the dropdown, then the corresponding values from the columns "lat" and "lon" together with "mtb" should be stored in the table #_markers.
"mtb" will be saved if I have selected a value in DropDown. "lat" and "lon" but not, not even if I try it with 2 hidden fields in the form.
First, I tried the PHP code. Did not work.
Then I tried it with 2 events in DropDown, which should save "lat" and "lon" in the hidden fields.
Did not work either.
Example:
From the "mtb_blaetter" table, the 1st row, ie the mtb number: 2448, is selected from the "mtb" column in the dropdown. (see Screen1)
The corresponding values from the columns "lat" and "lon",also 53.5384795 and 13.7315124, are stored together with the mtb number (2448) in the table "#_markers". (see Screen2).
[file=12154]screen1.jpg[/file]
[file=12155]screen2.jpg[/file]
If the lat and long are associated with an mtb, why do you need to save them at all?
The question is legitimate. :-)
I need the coordinates lat and lon, because the respective center coordinates are in a mtb quadrant and the point on a distribution map (divided into quadrants) is thus displayed exactly in the middle of the quadrant.
Is a bit complicated, because I use the input form to access an OS Map and GeoCoding.
Ok but why not just use the mtb and when you go to display your map, read the database again to get the lat and long? Which you will access using {var:read_data#.model.field} with the read set the return first matching