Results 1 to 7 of 7

Threaded View

Llama de Anor Two create account forms:... 12 Aug 2009, 04:28 AM
dbltoe Re: Tow create account forms:... 12 Aug 2009, 06:26 AM
Llama de Anor Re: Tow create account forms:... 12 Aug 2009, 06:56 AM
Llama de Anor Re: Tow create account forms:... 9 Sep 2009, 10:30 PM
Llama de Anor Re: Tow create account forms:... 10 Sep 2009, 01:25 PM
dbltoe Re: Tow create account forms:... 10 Sep 2009, 03:20 PM
beep Re: Tow create account forms:... 22 Oct 2009, 02:14 PM
  1. #4
    Join Date
    Nov 2007
    Location
    Girona (Spain)
    Posts
    31
    Plugin Contributions
    0

    Default Re: Tow create account forms: companies and individuals

    Hello again,

    I created some custom forms on the create account page in order to differentiate wholesale from individuals.
    I create a radio button that allows select if the customer is wholesale or individuals.
    The fact is that I need to hide the wholesale custom fields in the create account form if the option "individuals" is cheked.

    I add an onChange method that fires a javascript function in an option button input with a class="hide" in css. It seems that all is right but doesn't work. The problem is that zencart is unable to find the function. I have tried putting it in includes/modules/pages/create_account/jscript_addr_pulldowns.php and in includes/modules/pages/create_account/jscript_form_check without success, the mozilla firebug still says that the funtion is not defined.

    The function is:

    Code:
    function update_screen(valor) {
      var conjunto = document.getElementById('datos_empresa');
    
    	alert("pp");
    	
    	if (valor == 'Tienda' {
    	conjunto.className='hide';
    	} else {
    	conjunto.className='';
    	}
    }
    This is the radio button code:
    Code:
    <fieldset>
    <legend><?php echo TABLE_HEADING_TIPO_DETAILS; ?></legend>
    <?php
      if (TIPO_CLIENTE == 'true') {
    ?>
    <?php echo zen_draw_radio_field('tipologia_cliente', 'Tienda', '', 'onChange="return update_screen(this.value);" id="tipologia_tienda"') . '<label class="radioButtonLabel" for="tipologia_tienda">' . TIENDA . '</label>' . zen_draw_radio_field('tipologia_cliente', 'Particular', '', 'onChange="return update_screen(this.value);" id="tipologia_particular"') . '<label class="radioButtonLabel" for="tipologia_particular">' . PARTICULAR . '</label>' . (zen_not_null(ENTRY_TIPO_TEXT) ? '<span class="alert">' . ENTRY_TIPO_TEXT . '</span>': ''); ?>
    <br class="clearBoth" />

    Any clues of where do I have to put the function to make it work??

    Thank you very much in advance!
    Regards
    Last edited by Llama de Anor; 9 Sep 2009 at 10:35 PM. Reason: adding come code to clarify

 

 

Similar Threads

  1. v139h Create account and contact forms not working
    By mcpisik in forum General Questions
    Replies: 12
    Last Post: 15 Feb 2012, 07:13 AM
  2. login, create account and contact us forms border color
    By blue-grape in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 23 Apr 2010, 10:23 AM
  3. Duplicate forms on Account Create / Log In page
    By MtnVision in forum Managing Customers and Orders
    Replies: 1
    Last Post: 28 Jan 2008, 02:16 AM
  4. Bypass create account success page and go to My Account instead?
    By dealbyethan.com in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 3 Dec 2007, 01:50 PM
  5. Multiple 'Create Account' Forms
    By point4design in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 15 Mar 2007, 09:36 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR