Forums

how to get the name of the loaded form

NickOg 09 Aug, 2017
What is the simplest way to find the name of a loaded form?

Nick
GreyHead 10 Aug, 2017
HI Nick,

Use a Custom code option to dump $this and look through the results. In CFv5 it was $form->form['Form']['title'] there will be a CFv6 equivalent.

Bob
NickOg 10 Aug, 2017
Hi Bob

I have tried that - and will check again but so far having trouble finding it. I had wondered if there was a short code somewhere.

Thanks

Nick
GreyHead 13 Aug, 2017
Hi Nick,

I dumped $this for the basic-contact form - all 4915 lines . . . and . . . try {data:chronoform} that seems to work in my test in the form Load page.

Bob
NickOg 13 Aug, 2017
I looked and looked for that Bob. Will try it and see. 😶

Nick
NickOg 13 Aug, 2017
Nope. Not there. I think that somehow the problem is related to calling a CF6 form from a CC6 connection using

{chronoform:edConvenerForm}



My dump of $this and $this->data from within the CF6 form look likes like this:

    [G2\A\E\Chronofc\H\Parser object] (unknown name) Tooltip
        Properties
            [G2\L\View object] View
            [array] connections = (empty)
            [array] data
            [array] debug
            [array] fevents
            [array] functions
            [array] locales = (empty)
            [array] messages = (empty)
            [string] pattern = "/{(event|view|function|fn|section|connection|chronoform|var|data|date|user|value|val|session|redirect|page|path|error|success|info|warning|stop|end|la..." (Length = 214)
            [string] pattern2 = "/\((var|data|date|user|value|val|session|lang|language|l|uuid|rand|ip)([\/|\.][^:]+)?:([^}]*?)\)/i"
            [boolean] stopped = FALSE
            [array] vars
            [array] views
            [integer] viewslimit = 0
        Methods
    [array] (unknown name) Tooltip
        [string] Itemid = "639"
        [string] MorP = "M"
        [string] comprofilerid = "1466"
        [string] conn = "ManageConveners"
        [string] event = "edit"
        [string] option = "com_chronoconnectivity6"
        [string] view = "connection"


No reference to the form there. I will try using some other connection than {chronoform:edConvenerForm}
and see if that helps.

Regards
Nick
Max_admin 14 Aug, 2017
Hi Nick,

Can you find it using the debugger ?

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
NickOg 14 Aug, 2017
Hi Max

No - though the form is loaded as you can see. And all of the tables are read OK in the form.
[attachment=58853_20170814071842_4max-png.png][/attachment]

I can give you access if you need to of course.

Regards
Nick
NickOg 15 Aug, 2017
Further to that, Max, if I replace that {chronoform:edConvenerForm} with a function using redirect all works fine. I can see the form information with debug.
redirectTo("?option=com_chronoforms6&chronoform=edConvenerForm&comprofilerid=2626&MorP=M");

And one other thing that I hadn't mentioned that may or may not be relevant. I couldn't get [Submit] to work using that {chronoform:edConvenerForm} approach. Nothing I put into the Submit event displayed. I didn't investigate further since I was switching to the redirect option. Reworks fine,
Nick
Max_admin 19 Aug, 2017
Hi Nick,

I will check this further, glad you have it working now!

The next Connectivity update comes with the Chronoforms basic fields for better forms support.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.