Keyword

Extra Field - textarea

  • poselziobro
  • poselziobro's Avatar Topic Author
  • Offline
  • New Member
More
7 years 2 months ago #163832 by poselziobro
Extra Field - textarea was created by poselziobro
Hi.
From the MailChimp page I downloaded the ready-made html code to create a form to write to nwesletter.
When I type the code in extra field (textarea) then after write the system changes the code and the form in the article (front-end) does not work.

When I write the code directly in item then it writes correctly and works.

But I would rather have it work in every new item automatically.

correct code:
<div id="mc_embed_signup">
<form action="//tandem-psycholog.us14.list-manage.com/subscribe/post?u=03268072820ad4556fac5ecab&amp;id=247796a4a8" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll">
<div class="col-md-4 col-sm-4 col-xs-12">
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="Email" required>
<!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_03268072820ad4556fac5ecab_247796a4a8" tabindex="-1" value=""></div></div>
<div class="col-md-4 col-sm-4 col-xs-12">
<div class="mc-field-group">
<input type="text" value="" name="FNAME" class="" id="mce-FNAME" placeholder="Wpisz swoje imię">
</div></div>
<div class="col-md-4 col-sm-4 col-xs-12">
<div class="clear"><input type="submit" value="ZAPISZ MNIE" name="subscribe" id="mc-embedded-subscribe" class="button"></div></div>
</div>
</form>
</div>

code after save:
<div id="mc_embed_signup">
<form method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
<div id="mc_embed_signup_scroll">
<div class="col-md-4 col-sm-4 col-xs-12">
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="Email" />

<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_03268072820ad4556fac5ecab_247796a4a8" tabindex="-1" value="" /></div></div>
<div class="col-md-4 col-sm-4 col-xs-12">
<div class="mc-field-group">
<input type="text" value="" name="FNAME" class="" id="mce-FNAME" placeholder="Wpisz swoje imię" />
</div></div>
<div class="col-md-4 col-sm-4 col-xs-12">
<div class="clear"><input type="submit" value="ZAPISZ MNIE" name="subscribe" id="mc-embedded-subscribe" class="button" /></div></div>
</div>
</form>
</div>

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 2 months ago #163839 by Krikor Boghossian
Replied by Krikor Boghossian on topic Extra Field - textarea
For security reasons, the input is sanitised.
It is a better practise to have this code in your overrides.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • poselziobro
  • poselziobro's Avatar Topic Author
  • Offline
  • New Member
More
7 years 2 months ago #163840 by poselziobro
Replied by poselziobro on topic Extra Field - textarea
So ... there is no way for the code to run automatically and I would type it in every item manually?

Please Log in or Create an account to join the conversation.

More
7 years 2 months ago #163843 by william white
Replied by william white on topic Extra Field - textarea
getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

Putting the code in the proper place in item.php should work for you, and it will display on every item that belongs to a category that has the subtemplate with that item.php selected

Please Log in or Create an account to join the conversation.

  • poselziobro
  • poselziobro's Avatar Topic Author
  • Offline
  • New Member
More
7 years 2 months ago #163849 by poselziobro
Replied by poselziobro on topic Extra Field - textarea
So i have to find in my item.php (on mytemlpate/html/com_k2/mytemplate) place where is extra filed and paste my cod for mailchimp ?

Please Log in or Create an account to join the conversation.

More
7 years 2 months ago #163854 by william white
Replied by william white on topic Extra Field - textarea
I usually put new code at the top of item.php just under the title display to test it and get it working, later format the display by moving it down to where i want it and adding css if necessary

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 2 months ago #163862 by Krikor Boghossian
Replied by Krikor Boghossian on topic Extra Field - textarea
You can use a plain text textarea but it's considered a good practise to put code in your overrides.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • poselziobro
  • poselziobro's Avatar Topic Author
  • Offline
  • New Member
More
7 years 2 months ago #163884 by poselziobro
Replied by poselziobro on topic Extra Field - textarea

william white wrote: I usually put new code at the top of item.php just under the title display to test it and get it working, later format the display by moving it down to where i want it and adding css if necessary


thanks a lot
i just did that and works perfectly

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 2 months ago #163897 by Krikor Boghossian
Replied by Krikor Boghossian on topic Extra Field - textarea
Joe Campbell uses reReplacer for parsing raw code and still having all your assets in the backend.
You can give that a try.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum