Forums

Initialising A Form

digiPixel 08 Nov, 2011
Is there a way to initialise a form created using ChronoForms? At the moment I am trying do the following in PHP using the Joomla Platform APIs:

[list]
  • Navigate to an article by its ID

  • Grab the parameters that have been passed through from a previous form

  • Use the parameters to initialise the form that is to be loaded in the article
  • [/list]

    Also does ChronoForms have any APIs that work with the Joomla Platform APIs?
    GreyHead 09 Nov, 2011
    Hi digiPixel,

    Sorry, I know nothing about the Joomla! Platform - not even what it is.

    You can initialise a form using the Profile Page plug-in in CFv3; or the DB Record Loader, or the Session to Data actions in CFv4. It depends a bit where the data is coming from.

    Bob
    digiPixel 09 Nov, 2011
    I've found the "Session To Data" and "Data To Session" bits confusing in the wizard. Session To Data should be reading data from the session however it does the direct opposite, same with Data To Session only is in reverse order.

    Is there any way via PHP to initialise combo boxes, text boxes etc in a form? Although there is a way to read the data (from the session) it will not be useful on its own without getting the form setup so it can be used.
    GreyHead 10 Nov, 2011
    Hi digiPixel,

    For me 'Session to Data' reads the data from the User session and puts it into the $Form->data array; 'Data to Session' takes the form data array, merges it with any data already stored in the User session and re-asves the data to the session.

    I think that if the Form is set to Republish data then any values in the $form->data array will be show in the corresponding inputs i.e. those with matching names.

    If you want to do it manually with PHP then echo out the value from the $form->data array.

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