WebsiteBaker Support (2.8.x) > Bakery Shop
Pagesettings (overview)
Shefra:
Hello,
I want to change the input type from submit to image:
--- Quote ---<form action="[SHOP_URL]" method="post">
<input type="submit" name="view_cart" class="mod_bakery_bt_cart_ f" value="[VIEW_CART]" />
</form>
--- End quote ---
to
--- Quote ---<form action="[SHOP_URL]" method="post">
<input type="image" src="http://<websitename>/<image.img> name="view_cart" class="mod_bakery_bt_cart_ f" />
</form>
--- End quote ---
When i click on the image the webshop is reloaded instead of showing the cart.
Do i overlook something?
Thanks
Frank
freeSbee:
http://www.bakery-shop.ch/#navigation
Regards Christoph
Shefra:
Do i missing something? I read this section but i can use the input type="image" as well but is doesn't work.
freeSbee:
Please post or pm a link to the site.
Regards Christoph
DarkViper:
--- Quote from: Shefra on September 01, 2011, 08:20:20 PM ---Hello,
I want to change the input type from submit to image:
--- Quote ---<form action="[SHOP_URL]" method="post">
<input type="submit" name="view_cart" class="mod_bakery_bt_cart_ f" value="[VIEW_CART]" />
</form>
--- End quote ---
to
--- Quote ---<form action="[SHOP_URL]" method="post">
<input type="image" src="http://<websitename>/<image.img> name="view_cart" class="mod_bakery_bt_cart_ f" />
</form>
--- End quote ---
When i click on the image the webshop is reloaded instead of showing the cart.
Do i overlook something?
Thanks
Frank
--- End quote ---
so it should work.
--- Code: ---<form action="[SHOP_URL]" method="post">
<input type="hidden" name="view_cart" value="[VIEW_CART]" />
<input type="image" src="http://websitename/image.img" name="view_cart_submit" class="mod_bakery_bt_cart_f" alt="[VIEW_CART]" />
</form>
--- End code ---
why?
Your Input-Image-Tag does not submit a value ([VIEW_CHART]), that's why the script goes the default direktion (reload).
By the Hidden-Input-Tag now the value for $_POST['view_cart'] is submitted explicitly and all should work well again.
PS: an image needs the Alt-property also.
Navigation
[0] Message Index
[#] Next page
Go to full version