Jump to content

How to alter script so button will go to URL not to create account


elgordo1960

Recommended Posts

Hi, first post, be gentle ;)

 

I have a "create account" button on my site which I would like to change the properties so it goes to a particular URL when clicked and not to the create account form. I think the following is the script I need to alter, but I could be way off the mark as I am very new to php.

tpl_login_default.php

 

<?php echo zen_draw_form('create', zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')); ?>

<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_CREATE_ACCOUNT, BUTTON_CREATE_ACCOUNT_ALT); ?></div>

</form>

Link to comment
Share on other sites

change the bit in red to the url you want it to go to:

zen_draw_form('create', zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));

 

(make sure you sutround the url with ', like this: 'http://mydomain.com'

 

Hi, thanks for an amazingly quick reply. Sorry it didn't work...I think I left out some of the code..here is the complete line.

 

<?php echo zen_draw_form('create_account', zen_href_link('http://www.actorxfactor.co.uk/index.php?main_page=document_product_info&cPath=17&products_id=33', '', 'SSL'), 'post', 'onsubmit="return check_form(create_account);"') . zen_draw_hidden_field

Link to comment
Share on other sites

surely changing the url would change the page it directs to:

<?php echo zen_draw_form('create_account', zen_href_link('http://www.actorxfactor.co.uk/index.php?main_page=document_product_info&cPath=17&products_id=33', '', 'SSL'), 'post', 'onsubmit="return check_form(create_account);"') . zen_draw_hidden_field

changing it to:

<?php echo zen_draw_form('create_account', zen_href_link('http://www.google.com', '', 'SSL'), 'post', 'onsubmit="return check_form(create_account);"') . zen_draw_hidden_field

I would have thought that'd send the form to google. Not that google would take an action with it though.

Link to comment
Share on other sites

I think this is the script that defines the "CREATE_ACCOUNT" BUTTON ??

 

<?php echo zen_draw_form('create', zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')); ?>

<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_CREATE_ACCOUNT, BUTTON_CREATE_ACCOUNT_ALT); ?></div>

</form>

</fieldset>

 

If that's correct, how should I amend/replace the script to tell the button to go to a specific url ?

 

I appreciate any help as I'm really clutching at straws here!

Link to comment
Share on other sites

I'm sure that you need to change that part, but I think I may have ade a slight error. Try removing the 'zen_href_link' part as well.

So it looks something like this:

<?php echo zen_draw_form('create', 'http://mydomain.com/page_to_submit_form_to', '', 'SSL')); ?>

Link to comment
Share on other sites

I'm sure that you need to change that part, but I think I may have ade a slight error. Try removing the 'zen_href_link' part as well.

So it looks something like this:

<?php echo zen_draw_form('create', 'http://mydomain.com/page_to_submit_form_to', '', 'SSL')); ?>

 

That method doesn't work...but the first method you suggested nearly works...but instead of going to the url (I used google as a tst)

 

 

this is the amendment....<?php echo zen_draw_form('create', zen_href_link('http://www.google.com', '', 'SSL')); ?>

 

this is the result

 

https://www.actorxfactor.co.uk/index.php?main_page=http://www.google.com

 

close but no cigar :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.