viewform versus menu link

chrissy6930 15 Mar, 2015
hi all,

I am having a rather odd issue

my form listEntries contains both edit and delete links for each record

using the View Form link on admin side all is working fine

if however I use the menu link for that form (CF5 - listEntries) the edit links wont work - the edit form does not load , I would still see the listEntries form when trying to use the edit link

would anybody have an idea what the prob could be?

best regards
Gabriela
GreyHead 15 Mar, 2015
Hi Gabriela,

That sounds like a problem with SEF URLs - what URL do you see when you click the Edit links in the front end?

Bob
chrissy6930 15 Mar, 2015
Hi Bob,

using edit link on menu item (Manage Entries) to form listEntries:
../index.php/manage-entries?chronoform=addEntries&token=b9da4ad08cec99add138d1204746e14183e50045

uri when using edit link after using 'view form' on admin side for form listEntries:
../index.php/component/chronoforms5/?chronoform=addEntries&token=b9da4ad08cec99add138d1204746e14183e50045&Itemid=0

best regards
Gabriela
GreyHead 15 Mar, 2015
Hi Gabriela,

It might be that is the problem - what kind of menu item is it?

Bob
chrissy6930 15 Mar, 2015
Hi Bob,

type: CF5 form
form name: listEntries

best regards
Gabriela
chrissy6930 16 Mar, 2015
Hi Bob,

I also checked the link when disabling SEO

the edit link on the menu item would then look like this:
../index.php?option=com_chronoforms5&chronoform=addEntries&token=b9da4ad08cec99add138d1204746e14183e50045&Itemid=134

while using it after the view form on admin side:
../index.php?option=com_chronoforms5&chronoform=addEntries&token=b9da4ad08cec99add138d1204746e14183e50045&Itemid=0

still the link on menu item wont work

best regards
Gabriela
GreyHead 17 Mar, 2015
Answer
Hi Gabriela,

I have made a copy of your manageEntries form and have fixed most of these items I think.

The main problem was that you were outputting HTML directly from the On Load event of the form. While that works the output is not fully processed by ChronoForms.

I moved the main custom code elements from the form On Load event to Custom Code elements in the Designer tab and added an HTML (Render Form) action. The output is now processed by the HTML (Render Form) action and you get the expected results. The icons are showing and the Locales translate the text.

The breadcrumbs will not translate using ChronoForms Locales because they are output by Joomla! and ChronoForms does not get to see the HTML.

The Add Entry link was broken, I think because the Itemid was being added and Joomla! responded to that instead of to the body of the URL.

Bob
chrissy6930 18 Mar, 2015
hi Bob,

many thanks 4 that Bob! 😃
another observation:
using menu item then edit link did not work as is ... using add entry button (u removed itemID) and either submitting or using the back to entries button (no itemID added either) ... now back on entries page the edit link would work.
after removing the itemID from edit link as well edit links are now also working straight from menu item

I also moved the breadcrumb code to a custom element in the addEntry form in accordance to what u outlined above.

this makes me wonder since my previous setup of the form(s) DID work in my CF4 forms.

is this therefore a general change in setting up CF5 versus CF4 forms?
or would my CF4 forms, despite links & buttons working properly and no errors occuring, have not been properly set up by myself?

would be curious to find out which possibility would be true...

best regards
Gabriela
chrissy6930 18 Mar, 2015
ohhhhh!
but the delete links r not working anymore now... hmmm!
chrissy6930 23 Mar, 2015
I am still trying to find a solution to this

in CF4 all the add buttons the edit AND the delete links were working

with the same set up in CF5 accessing the respective form via menu item neither the add button nor the edit links are working but the delete links are working alright

moving the code in CF5 from setup tab to designer tab makes the add button and the edit links work but the delete links are not working anymore.

is there a syntax available that makes the delete links work in CF when moving the code to designer tab?

or would the only solution for me be to move back to CF4 with J3.4?

best regards
Gabriela
GreyHead 23 Mar, 2015
Hi Gabriela,

Looking at the page source there is a problem with the quotes and what you have is this
<a href='javascript:deleteEntry(\'a0dde802762d89a46c039ff49fc27602602214f2\')'>Delete</a></div>


Changing the Custom Code to
. . .<a href='javascript:deleteEntry(\"{$detail['uniq_id']}\")'>##DELETE##</a>. . .
appears to fix this. Nested quotes inside PHP echo statements are often a bit tricky :-(

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