How to add a sub block for contact form when called by a cms page
I'am trying to add Magento Captcha in my custom contact form and it's not working...
I added into contacts.xml the following :
<block type="core/template" name="contactForm" template="contacts/form.phtml">
<block type="captcha/captcha" name="captcha">
<reference name="head">
<action method="addJs"><file>mage/captcha.js</file></action>
</reference>
<action method="setFormId"><formId>contact_form</formId></action>
<action method="setImgWidth"><width>230</width></action>
<action method="setImgHeight"><width>50</width></action>
</block>
</block>
In my contact.phtml I added :
<?php echo $this->getChildHtml('captcha'); ?>
I think the problem is because my template file is called in a static block like this and the child captcha isn't known.
{{block type="core/template" name="contactForm" form_action="/contacts/index/post" template="contacts/form.phtml"}}
So the getChildHtml is null like it doesn't exist.
magento-1.7 forms contact-us
add a comment |
I'am trying to add Magento Captcha in my custom contact form and it's not working...
I added into contacts.xml the following :
<block type="core/template" name="contactForm" template="contacts/form.phtml">
<block type="captcha/captcha" name="captcha">
<reference name="head">
<action method="addJs"><file>mage/captcha.js</file></action>
</reference>
<action method="setFormId"><formId>contact_form</formId></action>
<action method="setImgWidth"><width>230</width></action>
<action method="setImgHeight"><width>50</width></action>
</block>
</block>
In my contact.phtml I added :
<?php echo $this->getChildHtml('captcha'); ?>
I think the problem is because my template file is called in a static block like this and the child captcha isn't known.
{{block type="core/template" name="contactForm" form_action="/contacts/index/post" template="contacts/form.phtml"}}
So the getChildHtml is null like it doesn't exist.
magento-1.7 forms contact-us
add a comment |
I'am trying to add Magento Captcha in my custom contact form and it's not working...
I added into contacts.xml the following :
<block type="core/template" name="contactForm" template="contacts/form.phtml">
<block type="captcha/captcha" name="captcha">
<reference name="head">
<action method="addJs"><file>mage/captcha.js</file></action>
</reference>
<action method="setFormId"><formId>contact_form</formId></action>
<action method="setImgWidth"><width>230</width></action>
<action method="setImgHeight"><width>50</width></action>
</block>
</block>
In my contact.phtml I added :
<?php echo $this->getChildHtml('captcha'); ?>
I think the problem is because my template file is called in a static block like this and the child captcha isn't known.
{{block type="core/template" name="contactForm" form_action="/contacts/index/post" template="contacts/form.phtml"}}
So the getChildHtml is null like it doesn't exist.
magento-1.7 forms contact-us
I'am trying to add Magento Captcha in my custom contact form and it's not working...
I added into contacts.xml the following :
<block type="core/template" name="contactForm" template="contacts/form.phtml">
<block type="captcha/captcha" name="captcha">
<reference name="head">
<action method="addJs"><file>mage/captcha.js</file></action>
</reference>
<action method="setFormId"><formId>contact_form</formId></action>
<action method="setImgWidth"><width>230</width></action>
<action method="setImgHeight"><width>50</width></action>
</block>
</block>
In my contact.phtml I added :
<?php echo $this->getChildHtml('captcha'); ?>
I think the problem is because my template file is called in a static block like this and the child captcha isn't known.
{{block type="core/template" name="contactForm" form_action="/contacts/index/post" template="contacts/form.phtml"}}
So the getChildHtml is null like it doesn't exist.
magento-1.7 forms contact-us
magento-1.7 forms contact-us
edited 21 mins ago
Teja Bhagavan Kollepara
2,98641947
2,98641947
asked Feb 10 '14 at 21:19
axelparatreaxelparatre
85415
85415
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
If this page is added via the cms section then what you could do is use the design tab in the admin section to add the layout xml that you need for your page. Then in this way you should be able to add all the items that you need.
add a comment |
follow these thread it will help you
http://www.magentocommerce.com/boards/viewthread/298363/
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f14796%2fhow-to-add-a-sub-block-for-contact-form-when-called-by-a-cms-page%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
If this page is added via the cms section then what you could do is use the design tab in the admin section to add the layout xml that you need for your page. Then in this way you should be able to add all the items that you need.
add a comment |
If this page is added via the cms section then what you could do is use the design tab in the admin section to add the layout xml that you need for your page. Then in this way you should be able to add all the items that you need.
add a comment |
If this page is added via the cms section then what you could do is use the design tab in the admin section to add the layout xml that you need for your page. Then in this way you should be able to add all the items that you need.
If this page is added via the cms section then what you could do is use the design tab in the admin section to add the layout xml that you need for your page. Then in this way you should be able to add all the items that you need.
answered Nov 13 '14 at 9:07
David MannersDavid Manners
24.7k862212
24.7k862212
add a comment |
add a comment |
follow these thread it will help you
http://www.magentocommerce.com/boards/viewthread/298363/
add a comment |
follow these thread it will help you
http://www.magentocommerce.com/boards/viewthread/298363/
add a comment |
follow these thread it will help you
http://www.magentocommerce.com/boards/viewthread/298363/
follow these thread it will help you
http://www.magentocommerce.com/boards/viewthread/298363/
answered Feb 11 '14 at 9:16
Deepak MallahDeepak Mallah
1,24421425
1,24421425
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f14796%2fhow-to-add-a-sub-block-for-contact-form-when-called-by-a-cms-page%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown