Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Form not submitting in metamod

Form not submitting in metamod

Hi,
I am using metamod free version to show form modules based on referer page. But the issue is that forms are showing properly but not submitting data and not redirecting after submission to other page. I have used below code in metamod php

if ($core_genius->check("referer = http://www.cedartub.alfalahhosting.com/ … html")) {
return 495;
}

elseif ($core_genius->check("referer contains electric-heat-products.html, small-4-person-electric.html, medium-6-person-electric.html, large-8-person-electric.html, xlarge-10-person-electric.html")) {
return 498;
}
elseif ($core_genius->check("referer contains gas-electric-hybrid-products.html, xlarge-10-person-gas-electric-hybrid.html, large-8-person-gas-electric-hybrid.html, medium-6-person-gas-electric-hybrid.html, small-4-person-gas-electric-hybrid.html")) {
return 500;
}
elseif ($core_genius->check("referer contains wood-fired-products.html, small-4-person-wood-fired.html, med-6-person-wood-fired.html")) {
return 506;
}
elseif ($core_genius->check("referer contains gas-propane-products.html, xlarge-10-person-gas-propane.html, large-8-person-gas-propane.html, medium-6-person-gas-propane.html, small-4-person-gas-propane.html")) {
return 508;
}
elseif ($core_genius->check("referer contains high-performance-products.html, elite-tub-with-electric-11-kw-heating-system-16-jets.html")) {
return 510;
}
else  return 504;

Kindly guide me if i have added wrong code and provide correct code so i can add it.

Regards,
SUAS

suasb52
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: Form not submitting in metamod

Hi suasb52,

I'm just looking at your site now. The code above seems to be syntactically correct, so I think that's ok. What I wonder about is by what mechanism the form actually fails when this code is in place.

That is, the form may fail for 1 of 2 reasons:
1 - the HTML of the page gets messed up in some way so that the form is no longer valid HTML and/or it gets new controls added to it that make it fail to submit, or submit bad data
2 - something happens (fails) on the form processing side.

Let's concentrate on #1 for now and see what's going on with the HTML of the page when the MetaMod adds a module.

Can I suggest the following:
1 - turn off the MetaMod and follow the page trail from electric-heat-products.html to the page with the MetaMod on it (you didn't specify which URL this is)
2 - take a copy of the HTML source of the page
3 - try submitting the form and see if anything happens. Ideally use a browser debugger or the Charles proxy app to see if there was a form submission HTTP request and make a note of what was contained in it.
4 - turn on the MetaMod
5 - take the page trail again from electric-heat-products.html to the page with the MetaMod on it
6 - take a copy of the HTML source of the page, and use a diff utility to compare the 2 sets of HTML. Is there any new HTML placed inside the <form> and </form> elements?
7 - submit the form and use the previous mechanisms to examine the HTTP request.
8 - also check your browser debugger to see if there were any JS errors generated. It may be that the module included by the MetaMod is interfering with the form JS.

I can help with some of this if you can tell me the URL of the page with the form on it.

Best regards,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3329 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1684
Total Polls:
6
Total Posts:
5940
Posts this week:
1
User Info:
 
Total Users:
5161
Newest User:
kbmgkey234q
Members Online:
0
Guests Online:
414

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked