Embedding an input form in CCv5

MainsailSoftware 24 Nov, 2015
I have a situation where I would like to embed some input fields to add a record to a DB table that is displayed using CCv5.

I fully understand how to setup an edit link to ChronoForms v5, but I don't want to have to leave the CC displayed web page and go to a separate ChronoForm web page.

I realize I can put input fields into the List display | Table | Header code section in a CCv5 Connection configuration, along with a custom button to perform a save submit url, but I am simply not sure how this will work.

Can I assume that if I create the field name attributes using the Model[field] naming convention in the Header code, that $this->data will have array values in the format: array('Model' => array('field1' => value1, 'field2' => value2, 'field3' => value3... and having the id PK field empty will result in a record insert into the related Model table?

Worse comes to worse, I can use the edit action and link to a ChronoForm to create a new record, but it would sure be nice to be able to embed a form directly within CCv5 page.
Max_admin 30 Nov, 2015
Hi MainsailSoftware,

Using the form code inside the hearder will not work, if you want the list + the form on the same page then use the 2 plugins calls in an article page, and the form will have to do the save using a "db save" action, I think this should work ok.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
MainsailSoftware 30 Nov, 2015
Thanks Max,

I was thinking this might be the case. I actually do this for another process on my website.

The issue I have faced with that approach is the need to have the form Submit properly refresh the article being displayed and not just the embedded form. Having explicit linkage from the form to the article reduces reusability and flexibility. Maybe I don't understand the proper way to implement this and one that is less coupled exists.

I really like using CCv5 as the base on which to add the CFv5 add/editing functionality.

What I am working on is an Account Financial transaction webpage, and I would like to have an inline transaction add input form and not have to leave the page to go to a CFv5 form.

It would just be nice if we could use the CFv5 plugin in the CCv5 Header code.
GreyHead 30 Nov, 2015
Hi MainsailSoftware,

I'm not sure if it would work for your case but you could add a link in the header box that opens a form in a Modal window for new records. However, new record won't appear in the listing until the page is refreshed.

Bob
MainsailSoftware 30 Nov, 2015
Thanks Bob,

That is what I am currently working on trying out... yes, same refresh issue.

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