how to add extra submit button in catalog items

aritra23
Kilo Contributor

how to add submit button in the catalog item forms instead of shopping cart

8 REPLIES 8

syedfarhan
Kilo Sage

Hi ,



Try this


Below is the UI macro code :


Name: submit_button



<?xml version="1.0" encoding="utf-8" ?>


<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">


<div class="orderButton">


<a class="request_catalog_button addtlBtn" onClick="orderNow();">Order Now</a>


</div>


</j:jelly>



Then you need to   added the variable to the form...


Type: Macro


Name: custom submit button


Macro:   "name of UI macro above" //submit_button



Thanks


Thank you Syed, that's exactly what I needed!


Syed,


I applied your macro to a sc item, but it does not appear to work on the form.   Is there something else I need to add for the onclick function or the script to create the new request?   Thank you.


twl


Steps:



1)Create a new variables ,name something like "Submit_button" for that service catalog item with the Type as "Macro".


2)In type specification Choose the Macro you have created (submit_button).



Now check,it should work.



Thanks,


Syed