Forums

Chronoconnectivity edit button to show result inside modal window

kwok 13 Jul, 2015
Hi Max/Bob,

I followed http://www.chronoengine.com/faqs/72-ccv5/5207-view-and-edit-actions.html to create list of records with edit links (_EDIT_: edit).

What are the ways to set it up such that onClick the record detail is displayed inside either a modal window or a new window?

Thanks,
kwok
simelas 01 Sep, 2015
Hi Kwok,

this is the solution i applied to some sites In chronoconnectivity connection for a new entry in a modal window. (The code uses JCE editor modal window , but this is applicable to joomla modal window too with some adaptation to href class. It works also for edit if calling the record with href="index.php?option=com_chronoforms5&chronoform=YOURFORM&token="<?php ..... ?>" )

Column list >>> Edit:Edit

HTML >>> Edit:<span style="font-size: 16pt; font-family: verdana,geneva; "><strong><a href="index.php?option=com_chronoforms5&chronoform=YOURFORM" target="_blank" class="btn btn-primary validate jcepopup noicon" role="button" style="width: auto;" caption="New Entry"; data-mediabox="width[1050]">New Entry</a></strong></span></span>

Cheers

simelas
kwok 29 Nov, 2015
Hi Simelas,

Finally, I'm picking up the project again.

Thanks for the tips.

What exactly is inside token="?php...?>

Can you demonstrate with screenshot of a form?

How does it work with a simple CC v5 form? For instance, I have a feedback form that would like to be shown inside a modal window. After the visitor submit the form, I would like to show a thankyou message in the same or another modal window.

Best Regards.
Kwok
simelas 04 Dec, 2015
Hi Kwok,

token="?php...?> "token" or any other variable should contain a unique identificator for the record you want to retrieve.

In case of chronoconnectivity Max used "gcb" to contain the id of the record to get. ( see hereafter where gcb appears)

Solution i used for opening a modal window:
Chose one field in Columns list to be linkable. For example Model.id
Make it linkable by adding it in Edit linkable
Determine its behaviour in HTML. For example: Model.id:<a href="index.php?option=com_chronoconnectivity5/&cont=lists&act=edit&ccname= Name of Your Form &gcb={Model.id}" target="_blank" class="jcepopup noicon " role="button" style="width: 150px" data-mediabox=""><strong>Edit</strong></a>

In that case the modal behaviour is produced by jce editor, but you could very well use target="_blank" rel="{handler: 'iframe', size: {x:400, y: 400} }" instead of target="_blank" class="jcepopup noicon "

Cheers

Simelas
kwok 05 Feb, 2016
Hi Simelas,

I finally make it work in CC.

Is this used on CF?
<span style="font-size: 16pt; font-family: verdana,geneva; "><strong><a href="index.php?option=com_chronoforms5&chronoform=YOURFORM" target="_blank" class="btn btn-primary validate jcepopup noicon" role="button" style="width: auto;" caption="New Entry"; data-mediabox="width[1050]">New Entry</a></strong></span></span>

If so, where in CF to input it?

If not, have you found a way to show CF result inside a modal window?

Thanks,
Kwok
GreyHead 05 Feb, 2016
Hi Kwok,

If you want to show a form and the results in a modal window then I think that either (a) you must load the form in an iFrame or (b) you will need to use Ajax submission and somehow add JavaScript to show the results after the submission completes.

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