Pola wymagane w formularzu "Zapytanie o produkt"
Wyniki 1 do 2 z 2

Temat: Pola wymagane w formularzu "Zapytanie o produkt"

  1. #1
    Bywalec
    Dołączył
    30-05-2006
    Wpisy
    160
    Punkty
    10

    Domyślny Pola wymagane w formularzu "Zapytanie o produkt"

    Witam

    utworzyłem sobie nowe pola w formularzu "Zapytaj o produkt" jednak nie są one polami wymaganymi. Co należy zrobić, bądź gdzie szukać kodu za to odpowiedzialnego?

    W pliku formularza jest tylko taki skrypt, ale widzę, że sprawdza tylko poprawność adresu e-mail.

    Kod:
    <script type="text/javascript">
    	function validateEnquiryForm() {
    		if ( ( document.emailForm.text.value == "" ) || ( document.emailForm.email.value.search("@") == -1 ) || ( document.emailForm.email.value.search("[.*]" ) == -1 ) ) {
    			alert( "<?php echo $VM_LANG->_('CONTACT_FORM_NC',false); ?>" );
    		} else if ( ( document.emailForm.email.value.search(";") != -1 ) || ( document.emailForm.email.value.search(",") != -1 ) || ( document.emailForm.email.value.search(" ") != -1 ) ) {
    			alert( "You cannot enter more than one email address" );
    		} else {
    			document.emailForm.action = "<?php echo sefRelToAbs("index.php"); ?>"
    			document.emailForm.submit();
    		}
    	}
    	***********
    W standardzie, wymaganymi polami są: adres e-mail oraz treść zapytania.

    Bardzo proszę o pomoc.

    Pozdrawiam!

  2. #2
    Bywalec
    Dołączył
    30-05-2006
    Wpisy
    160
    Punkty
    10

    Domyślny

    Znmalazłem na innym forum:

    Znaleźć components/com_virtuemart/themes/default/templates/pages/shop.ask.tpl.php

    w pobliżu lini 51 poszukać:

    Kod:
    if ( ( document.emailForm.text.value == "" ) || ( document.emailForm.email.value.search("@") == -1 ) || ( document.emailForm.email.value.search("[.*]" ) == -1 ) ) {
    zamienić na:

    Kod:
    if ( ( document.emailForm.text.value == "" ) || ( document.emailForm.name.value == "" ) || ( document.emailForm.email.value.search("@") == -1 ) || ( document.emailForm.email.value.search("[.*]" ) == -1 ) ) {

Reguły pisania

  • Nie możesz zakładać nowych tematów
  • Nie możesz dodawać wypowiedzi
  • Nie możesz dodawać załączników
  • Nie możesz poprawiać swoich postów
  •