How to reload a from when data are loaded.

RobP 16 Aug, 2014
I have a form that first lets the user make a selection of previous submitted forms based on the date, that part works.

The problem is refreshing the form with the selected data.
If I set the HTML (Render form) Submit event to load it works.

But now I can't submit the form anymore.

Is there a solution for this?

Rob
RobP 16 Aug, 2014
A button with:

Type=submit
Value="load"
Name="event"

works.

Only the Button has a caption load

Rob
GreyHead 17 Aug, 2014
Hi Rob,

I'm sorry but I don't understand what you are trying to do here :-( Please can you add some more detail about the process.

Bob
RobP 17 Aug, 2014
Hi Bob.

Sorry for the confusion, it was rather late yesterday.

The part I am working on is a survey for working conditions.
Users can fill in this survey multiple times (after something is changed in their working environment).

The idea is that they can finish or change their submitted surveys at a later time.

I start with a DB (Multi read) with their records and the fields "id" , "date", and a short description.
In the conditions I have:

<?php
$user =& JFactory::getUser();
$var =$user->id;
return array ("user_id = {$var}" );
?>


These result are used in a Dropdown to select the id , the fieldname is "keuze".

The next DB Read (same table without Multiread) loads the selected record:

<?php
 return array("id" => $form->data["keuze"]);
?>


To load the requested record and to get the data in the appropriate fields I have to reload the form, or put it on a new page (seems now a better idea).

I tried to add an new event and put an "Event loop" with Load in it.

Unfortunately I can't figure out how to activate that event with the Events from the DropDown, so I put a button on the form to reload the form.

Custom code:
<input type="submit" event="load" data-load-state="" style="" class="form-control A" value="load" id="button2" name="event">

This reloads the form, but the button has "load" on it.

Rob
Max_admin 18 Aug, 2014
Hi,

Add a hidden field, name it "event", value = "load", and change your button's name to something else!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
RobP 18 Aug, 2014
Hi Max,

That has the same effect as setting the HTML event to load.
The problem is that I can't submit the form when the event is set to load.

What I tried was adding an Event (On reload) and putting an event Loop in it and activate that event from a dropdown.
I can't figure out how to do it in this screen.
How to reload a from when data are loaded. image 1

Rob
Max_admin 19 Aug, 2014
Hi Rob,

I have a form that first lets the user make a selection of previous submitted forms based on the date, that part works.


How did you do this ? using a dropdown ? what about using ChronoConnectivity with list of links instead ?

You can "disable" the hidden field using the events section and that would not submit its value, but it depends on your form setup.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
RobP 19 Aug, 2014
Hi Max,

Thanks for the reply.

I already decided to use a ChronoConnectivity to make the selection, it works great.

Rob
This topic is locked and no more replies can be posted.