Mon. - Fri. 9 am - 5 pm Ask a Question
Remember me

Terms&conditions html also submitting.

6 years 6 months ago #1

  • Somnustin's Avatar
  • Somnustin
Hello,
I tried to remove the terms from submitting, but error message appears: "You cannot delete rows with form fields".
I really don´t need to submit or collect into db (of course it´s going to form submitter too) all the html and button html which I created to display Terms on modal. It is sending everything because html is on the label-field. Any help on this?

6 years 6 months ago #2

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 27049
Hello,

Send us FTP access and Joomla admin access via our contact form.
support.balbooa.com/contact-us

Regards,
Vyacheslav, Balbooa.com

6 years 6 months ago #3

  • Somnustin's Avatar
  • Somnustin
Request was denied. So I don´t have a permission to do that. Can you just reply some instructions to which file to modify?

6 years 6 months ago #4

  • Artem's Avatar
  • Artem
  • Posts: 11016
Hello,

Okay, here is solution for the latest version of the Forms component - 1.6.2

Add this code:
if ($type == 'terms') {
     $body = $this->letter;
     $pos = strpos($body, 'item='.$item->id. ']');
     $pos = strpos($body, '>', $pos);
     $start = substr($body, 0, $pos);
     $end = substr($body, $pos);
     $str = ' style="display:none;"';
     $this->letter = $start.$str.$end;
                            }

after line 1731 in the file components/com_baforms/models/form.php

Regards,

6 years 6 months ago #5

  • Somnustin's Avatar
  • Somnustin
Thanks. But it is not working. Emails still have html, both auto-reply and the original recipient. I saw there was a display:none; present on one email client, three others are stripping styles so the modal html is still in the end of the message.
Line number is a bit odd too. I tried two other places also.

6 years 6 months ago #6

  • Artem's Avatar
  • Artem
  • Posts: 11016
Try after line 1725, should be like on my screen:
goo.gl/CdihPI

Regards,

6 years 6 months ago #7

  • Somnustin's Avatar
  • Somnustin
Thanks again. That line I didn´t try, but near. Emptied Joomla and the browser. Result was the same. Emails contain all that is in the terms label field. I have to publish the form probably today, so I think I have to go with jQuery appendTo... That way emails stay a bit cleaner.

My modal html is using same classes as your forms component on the backend so it is a bit messy there anyway. For instance whole admin side of the forms component disappeared while I had style=display:none; on terms label html. And with the current modal html it is still there partly disturbing admin side of your component so I will clean it a bit.
What software was the screenshot from?

6 years 6 months ago #8

  • Artem's Avatar
  • Artem
  • Posts: 11016
I can recommend you next solution,

1. Replace all the code back to the original
2. Create Filed Terms & conditions manually using, text and checkbox tool, more details you can find here: support.balbooa.com/forum/joomla-forms/249#966

And you will be able to remove Terms and Conditions from email

Regards,
Artem

6 years 6 months ago #9

  • Somnustin's Avatar
  • Somnustin
Thanks a lot. This one was a perfect solution. Done it already.
Just changed my modal-class to different as on admin side forms is using same class name.
Powered by Kunena Forum