Hi there,
been playing the last days with CF and CC and I'm so glad I've found them.
Still, after browsing and browsing forums for, I can't figure out a complete solution to this issue: having an edit form above a list of records already entered. Feel silly.
So I've managed to:
- build a CF to save my items
- build a CC to display saved items
- enable necessary setting and copy the code from CF inside my CC's header
But I'm obviously missing something here, because the CC-included form code doesn't work.
My CF saves regularly and goes back to a new empty form, when used alone.
So does the connection: used alone it works fine and it shows the right records (filtered by user).
How can I make them work together?
TIA
rash*
been playing the last days with CF and CC and I'm so glad I've found them.
Still, after browsing and browsing forums for, I can't figure out a complete solution to this issue: having an edit form above a list of records already entered. Feel silly.
So I've managed to:
- build a CF to save my items
- build a CC to display saved items
- enable necessary setting and copy the code from CF inside my CC's header
But I'm obviously missing something here, because the CC-included form code doesn't work.
My CF saves regularly and goes back to a new empty form, when used alone.
So does the connection: used alone it works fine and it shows the right records (filtered by user).
How can I make them work together?
TIA
rash*
Hi rash,
That may be possible, but I've never tried to do it. ChronoConnectivity is designed to display many records and use 'edit record' links from each of them to link to a ChronoForm.
It may be possible to put a ChronoForm in the header but you will need to take care to get the form action correct.
Bob
That may be possible, but I've never tried to do it. ChronoConnectivity is designed to display many records and use 'edit record' links from each of them to link to a ChronoForm.
It may be possible to put a ChronoForm in the header but you will need to take care to get the form action correct.
Bob
Hey GH,
yep, that's what I've been looking for... how do you do that? I mean, how do you specify a form's action from CC? And, how do I get to know the right action? I've managed to build such a page (edit form on top, record list below) but I'm obviously missing the right action...
Thanks for your help!
rash*
yep, that's what I've been looking for... how do you do that? I mean, how do you specify a form's action from CC? And, how do I get to know the right action? I've managed to build such a page (edit form on top, record list below) but I'm obviously missing the right action...
Thanks for your help!
rash*
Hi rash,
Well, you'd need to add the form tags in the Header box. Both <form . . .> and </form> and you'd need to have the ChronoConnectivity Form tags turned off*.
Assuming that you want to have the form behave like a CF form then the action would need to be the corresponding CF action which will be something like
Bob
* If you want to use links in the ChronoConenctivity listign as well then you'd need to add the CC <form>tags manually with the <form . . .> tag in the Header box **after** the CF </form> tag and the CC </form> tag in the Footer box.
Well, you'd need to add the form tags in the Header box. Both <form . . .> and </form> and you'd need to have the ChronoConnectivity Form tags turned off*.
Assuming that you want to have the form behave like a CF form then the action would need to be the corresponding CF action which will be something like
http://www.example.com/index.php?option=com_chronocontact&chronoformname=my_form_name&task=sendBob
* If you want to use links in the ChronoConenctivity listign as well then you'd need to add the CC <form>tags manually with the <form . . .> tag in the Header box **after** the CF </form> tag and the CC </form> tag in the Footer box.
Woah GH,
thanks a lot, that's a good starting point!
I'll dig into your suggestions, will let you know if I'll be able to get me done.
Cheers,
rash*
thanks a lot, that's a good starting point!
I'll dig into your suggestions, will let you know if I'll be able to get me done.
Cheers,
rash*
Mmmmh GH,
it almost works.
When I submit my form, I get a "You're not allowed to access this URL" error.
I realized I'm missing two hidden fields in my form, like:
and I'm afraid the problem are those two hidden fields.
What do they bring over and how do I build them?
A minor point in this is why the same CF form code has different styling when used in CC...
Thanks,
rash*
it almost works.
When I submit my form, I get a "You're not allowed to access this URL" error.
I realized I'm missing two hidden fields in my form, like:
<input type="hidden" name="64618cd...2733" value="1" />
<input type="hidden" name="1cf1" value="576561...e556" />
and I'm afraid the problem are those two hidden fields.
What do they bring over and how do I build them?
A minor point in this is why the same CF form code has different styling when used in CC...
Thanks,
rash*
Hi rash,
True, I forgot about those. They are there to stop you running a ChronoForm except from a ChronoForm. You could track down the code that ChronoForms uses toe create them and copy that if you want to.
This is all getting a bit complex and messy though :-(
Bob
True, I forgot about those. They are there to stop you running a ChronoForm except from a ChronoForm. You could track down the code that ChronoForms uses toe create them and copy that if you want to.
This is all getting a bit complex and messy though :-(
Bob
G'day GH!
Well, it works (thanks a lot!).
I've tracked down the code used by Joomla/CF as you suggested and finally I have a page working as expected (if you want, I can provide link and credentials to view it).
I've already started writing a small how-to about it but I have now to complete the page with CC editing links (Delete works, Edit still gives me permission problems).
Complex and messy: complex, well, a tiny bit but far from rocket science; messy, I agree more about this point, at the end I'm rebuilding a component code (CF) into another (CC), how would you do it alternatively? Would be easier to do it the other way around (insert CC code inside CF), if possible? Not a cleaner way, I'd agree...
Cheers,
rash*
Well, it works (thanks a lot!).
I've tracked down the code used by Joomla/CF as you suggested and finally I have a page working as expected (if you want, I can provide link and credentials to view it).
I've already started writing a small how-to about it but I have now to complete the page with CC editing links (Delete works, Edit still gives me permission problems).
Complex and messy: complex, well, a tiny bit but far from rocket science; messy, I agree more about this point, at the end I'm rebuilding a component code (CF) into another (CC), how would you do it alternatively? Would be easier to do it the other way around (insert CC code inside CF), if possible? Not a cleaner way, I'd agree...
Cheers,
rash*
Hi rash,
I link the ChronoConnectivity entries to a ChronoForm on a separate page and set the ReDirect link for the ChronoForm to return to the CC Listing. I've also done it using a ChronoForm in a modal window to view details - that could also work to edit details. I keep the heeader box to use for filters for the CC Listing.
But . . if it works for you, that's great :-)
Bob
I link the ChronoConnectivity entries to a ChronoForm on a separate page and set the ReDirect link for the ChronoForm to return to the CC Listing. I've also done it using a ChronoForm in a modal window to view details - that could also work to edit details. I keep the heeader box to use for filters for the CC Listing.
But . . if it works for you, that's great :-)
Bob
Hi GH,
the main reason to keep both (edit form and listing) on the same page is to speed up inserts, that would happen in long sessions and only in a initial phase (most of pages I'm gonna build this way are to manage look-up tables entries).
Thanks again for your help!
Ciao!
rash*
the main reason to keep both (edit form and listing) on the same page is to speed up inserts, that would happen in long sessions and only in a initial phase (most of pages I'm gonna build this way are to manage look-up tables entries).
Thanks again for your help!
Ciao!
rash*
Hi there,
made a few tests, had lot o' troubles.
Most of all, I realized that the outcome of the initial approach was kinda wrong.
Not being able to load existing data into the edit form above the list, my edit links forced me to open a modal edit form on top of the edit form already there... messy. You were right, GH!
Not to mention other problems (all solved, btw) with javascript code to have calendar fields working properly and so on. Good exercise in tracking and solving problems, ok, still the result was not as good as hoped.
So I converted to your solution: use a simple CC form and create edit links to a modal CF edit form (avoiding CC edit link).
To this:
- I've created a simple CF form and tested
- I've created a simple CC form and built edit links like this:
- configured Profile plugin for my CF form, with 'cf_id' and '{cf_id}' as parameters, edit Yes and Evaluate code Yes
- activated Profile plugin from my CF form
The modal form opens with my record data but submitting the form creates a new record!
What am I missing??
Faithfully,
rash*
made a few tests, had lot o' troubles.
Most of all, I realized that the outcome of the initial approach was kinda wrong.
Not being able to load existing data into the edit form above the list, my edit links forced me to open a modal edit form on top of the edit form already there... messy. You were right, GH!
Not to mention other problems (all solved, btw) with javascript code to have calendar fields working properly and so on. Good exercise in tracking and solving problems, ok, still the result was not as good as hoped.
So I converted to your solution: use a simple CC form and create edit links to a modal CF edit form (avoiding CC edit link).
To this:
- I've created a simple CF form and tested
- I've created a simple CC form and built edit links like this:
<?php
JHTML::_('behavior.modal');
echo "<a class='modal' href='index.php?option=com_chronocontact&chronoformname=Unitqty&cf_id={cf_id}&tmpl=component' rel='{handler: \"iframe\", size: {x: 600, y: 400}}'>{name}</a>";
?>- configured Profile plugin for my CF form, with 'cf_id' and '{cf_id}' as parameters, edit Yes and Evaluate code Yes
- activated Profile plugin from my CF form
The modal form opens with my record data but submitting the form creates a new record!
What am I missing??
Faithfully,
rash*
Hi again,
ok, got a first result: I can retrieve data for the item to be edited now, I've added the following code to my CF form and it works fine:
The code has been written reading *a lot* of your posts here and goggle-ing a bit (it could be surely written better, I can read PHP but writing it still misses me).
Now, when I hit Save my CF modal form saves ok but it doesn't close! Instead it shows the redirect page I've set for my CF form... why? I *do* load modal code in my CC form... so what?
Cheers,
rash*
ok, got a first result: I can retrieve data for the item to be edited now, I've added the following code to my CF form and it works fine:
<?php
if ($_GET['cf_id'] != '') {
echo "<input type=\"hidden\" name=\"cf_id\" id=\"cf_id\" value=\"" . $_GET['cf_id'] . "\" />";
}
?>
The code has been written reading *a lot* of your posts here and goggle-ing a bit (it could be surely written better, I can read PHP but writing it still misses me).
Now, when I hit Save my CF modal form saves ok but it doesn't close! Instead it shows the redirect page I've set for my CF form... why? I *do* load modal code in my CC form... so what?
Cheers,
rash*
Hi rash,
Please check this thread where there are some posts on closing the window onSubmit. As you'll see it's tricky.
In the past I've shown a simple thank you message in the window and left the user to close it but that doesn't do the redirect that you want.
Bob
PS For Googling ChronoForms topics you may find the custom ChronoSearch useful.
Please check this thread where there are some posts on closing the window onSubmit. As you'll see it's tricky.
In the past I've shown a simple thank you message in the window and left the user to close it but that doesn't do the redirect that you want.
Bob
PS For Googling ChronoForms topics you may find the custom ChronoSearch useful.
This topic is locked and no more replies can be posted.
