How to link a listing item to a form ?

Fredd 14 Oct, 2015

I am wondering how to do this :
[list=]Having a form that make an entry in a Chonoconectivity listing (this par is OK, already done with a DB Table).
When a user clic on a line of this listing (let us say that it is a product) a form load WITH the product name on a field and others fields to be completed by the user.

Could you guide me a little (link on tuto or soemthing) if you please ?

Thank you in advance.
Fredd 14 Oct, 2015
Here is a site doign what I would like to do :
GreyHead 17 Oct, 2015
Hi Fredd,

Please see this FAQ - you can link the CC listing to a different form that includes extra inputs. If you want to make some non-editable then add readonly=readonly in the Extra Params box of the element.

Fredd 19 Oct, 2015
Hi Bob,

Thnak you for your answer.
Well, it works more or less...
I have the following issues :
- When I open the form from my listing and I submit IT, it makes two new lines (one with global info from my form, the other one handling only fields with many choicies - ckeckboxes -...)
- I have an upload file field in my form, and the file attachment is not working when calling the form from my listing

Thank you in advance for your help.
GreyHead 19 Oct, 2015
Hi Fredd,

Sorry but I'm not clear what first problems is?

+ Is it that it is now creating two different records - one DB Save action can't do that as far as I know?

For the file attachment - do you have the Files Upload action before the Email action? Do you have the name of the File Field element in the Attachments box of the Email action?

Fredd 19 Oct, 2015

Yes, it does crate two records.
I Have a form, called "annonce" with a text box. I load this form and put in the text area "ref 123"
It creates two records on my listing (ID N°1 - text box blank - & ID N°2 field with "ref 123" ).
I clic on this record on my listing, that edit my form with multiple fields (and in this new form I see the "annonce" field whith value "ref 123".
I fill the fields, submit, and it creates two records, one with all information (exept the filed uploaded) a the other one blank.

The second problem is that I can't see the file upload in my listing.
I think it appens since I rename the file upload field with array (old : "envoi_cv" new : "testdc[envoi_cv]")
GreyHead 19 Oct, 2015
Hi Fredd,

Are you using a Save action from CC AND a DB Save action in the form? That will create two records.

Is the Files Upload action configured to the new name?

Fredd 19 Oct, 2015

Thank you, so I let only the "CC Save" action and it is OK, I've got only one record.
Well, step by step !

For my file upload field, yes, I have the same name in the "File config" field : "testdc[envoi_cv]:jpg-png-gif-docx-xlsx-pdf"
I Have a "File upload" action on my "on load" and on "on submit" (if captcha is good).
It is strange because I always got a message telling that captcha is not correct despite it is and record is save...

I also have a problem with fields with "events" / "show parents", wich are not working anymore since I rename fields with arrays.
GreyHead 19 Oct, 2015
Hi Fredd,

The 'event's action work on the input ID and the IDs should not contain [], please change those to e.g. testdc_envoi_cv where the name is testdc[envoi_cv]

I'm not sure about the Files Upload action settings - there is an Arrays box further down - you may need to add testdc in there.

Fredd 19 Oct, 2015
Well, it is not working...
I'm a bit lost...
Fredd 19 Oct, 2015
Hi Bob,

I have made some other tests.

In fact, when I use the form from itself, multiple fields are working as well as file upload (I can retreive them in my listing).
But, when I load the form FROM THE LISTING, it doesn't work (multiple input doens't appear, file uploaded are not shown, parent field doesn't work...).

Do you have any idea ?

In fact, for you to see my project, I am tring to do a job offer listing :

- One post a job offer with a referal number (annonce)
- In the listing we can view the offers
- Clic on a job offer: that loads a form with this refferal number (annonce) in this form we have several field to answer to this job offer.
- The second form is also saved in the listing
Fredd 20 Oct, 2015
Hi Bob,

Well, I have solved the multiple fields and other little things.

The things left, are :

When I use the form via edit link in CC, the file upload doesn't work (it works when I use the form by itself)

Could you please help me ?
Max_admin 24 Oct, 2015
If you have an upload files action then it should work, assuming you have setup the fields names right.
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Fredd 26 Oct, 2015

Thank yo ufor your answer.
Well, if I look my form I do have all the fields...
I attach you a screen shot.
GreyHead 26 Oct, 2015
Hi Fredd,

The Files Upload action usually goes in the On Submit event to handle the uploaded files after the form is submitted.


PS I also generally recommend not using the On Success event of the Check Captcha action - just put the Event Loop in the On Fail box and the other events after it. It's just tidier that way.
Fredd 27 Oct, 2015
Hi Bob,

Thank yo ufor your answer.
I did what you suggest for the "On Submit".
For the Captcha, If I put an "Even Loop" in "on fail", it keeps telling that the code is wrong and do not attach the file, even if now they are not anymore on the "Check Captcha" action.
So I am not anymore checkin Captcha and... IT WORKS !! Than you, i'll will see later on how to check Captcha.

Because I still have an important issue : I Have a form that create an annoncement.
When we clic on this form on CC listing, it opens my main form (sort of "reply to an annoncement form".
The field "Annonce" is present on this main form.
When I send this main form, I got an email sending action, in witch I can find the value of my "Annonce" field.
But, in the CC listing, this field keeps empty...

Do you have any idea on how I could pass this field to my listing ?

Thank you again in advance.
Fredd 27 Oct, 2015
Sorry, one screen shot is missing :
GreyHead 27 Oct, 2015
Hi Fredd,

If the field name is testdc[annonce] then it will only save if you are using a Model ID of testdc in the DB Save action. I can't tell from what is here.

Please drag a Debugger action into the On Submit event, then submit the form and post the debug - including the 'dummy emails' results here.

Note: if you are using the Easy Wizard you can turn on Debug on the Others tab in CFv4 or the Setup tab in CFv5.


PS The id should not be testdc[annonce] as [] are not valid in ids - please change that to e.g. testdc_annonce
Fredd 27 Oct, 2015

Ok, here are the debug info and picture of my "annonce field".

For the last part of your email "PS The id should not be testdc[annonce] as [] are not valid in ids - please change that to e.g. testdc_annonce" I don't understand where to put this information...

Thank you.
GreyHead 28 Oct, 2015
Hi Fredd,

I'm sorry, Now I am lost.

You have an input testdc[annonce] in your form - it is the only one with this format. Why do you have that as an array value?

The DB Save image you posted shows the Model ID enabled and set to Data. Why is that enabled?

The MySQL query in the Debugger output doesn't include the annonce column - possibly because the data doesn't exist.


PS The ID is set in the Field ID box of the element in the Designer tab. See one of your earlier images.
Fredd 28 Oct, 2015
Hi Bob,

Yes, I understand, it is difficult to explain...

Well, I'll try to make an example to make it clearer :

- A site membrer loads a form "annonce". He fills this form with : We are hiring an accountant"
- A visitor on the website see a list of jobs offers (cc listing - "ccdepotcandidature" - showing "annonce" records).
He clics on the record "We are hiring an accountant" : it opens a form (Test-Depot_candidature_fr).
In this form, there is a field filled with the record value from where it was previously cliqued "We are hiring an accountant".
The visitor fill all the fields of "Test-Depot_candidature_fr", send the form.
A new record is created in CC listing, with all the informations of the visitor and the refferal on "annonce" : "We are hiring an accountant".

Well, for the DB Save I put it now with "no".
I have filled the ID as shown on screen shot in cc connexion / Admin List / Settings / Fields

Thank you again.
Fredd 29 Oct, 2015
Hi Bob,

Well, it finnaly working !
In the designer, I put "annonce" in "Field Name" an "Field ID" and "{testdc.annonce}" in Field Value (where "testdc" is my cc connection name.

But... I have another problem with the captcha : when I use the form by itself or by the Front View of CC, it is OK.
If i call my form from the Admin view, it keeps me telling that code is wrong...
I attach an image of my set up items.

Thank you in advance.
This topic is locked and no more replies can be posted.