Adding Paypal "Buy Now" button to the html file - meteor

am following Paypal tutorial for adding "Buy now" button. I pasted the button code as it is shown in the code below
<template name="itemDetails">
<div class="container">
<div class="row">
<div class="col-md-3">
<p class="lead">Categories</p>
<div class="list-group">
Android
IOS
Unity
</div>
<button type="button" class="btn btn-info btn-block sell">Post</button>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="someRandomeValue">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
</div>
but i can't see the button when navigate to the page! why?

It turned to be silly mistake which i didn't notice earlier.
i had to include this line of code in the server side
BrowserPolicy.content.allowOriginForAll( '*.paypalobjects.com' );

Related

Specify CSS to a container/div/class above its own in Drupal

I am using drupal and super happy with a live edit field module. However this module has been developed with ajax functionality which works brilliantly but seems to still force a button form wrapper fields. I can use CSS to hide this field which works great but the button field ID and wrapper are generic and takes buttons away from the rest of the site. The button wrapper etc are generated by the Drupal CMS of which edits are way out of my scope of understanding.
<div class="form-actions form-wrapper" id="edit-actions"><input type="submit" id="edit-submit" name="op" value="Save" class="form-submit"></div>
I am trying to hide with
`
div#edit-actions.form-wrapper {
display: none;
}
`
But this is hiding relevant buttons that need to be used elsewhere in the site. Here is some of the container code.
`
<div class="content">
<div class="view view-account-content view-id-account_content view-display-id-block_1 view-dom-id-b611690449f4a19aecf257c830f8b956 jquery-once-1-processed refresh-processed">
<div class="view-content">
<div class="views-form"><form action="/testdev/" method="post" id="views-form-account-content-block-1" accept-charset="UTF-8"><div><input type="hidden" name="form_build_id" value="form-ycIZQs2NnfOiNp4mkOR_11YB656wl-cYbXdlo8Cidwk">
<input type="hidden" name="form_token" value="phM-fFmZ9Y6mbpN-0fXff-cfwKo5JvbVdmhYt40dyNc">
<input type="hidden" name="form_id" value="views_form_account_content_block_1">
<table class="rwcls2 views-table cols-0">
<tbody>
<tr class="odd rwcls views-row-first views-row-last">
<td class="views-field views-field-name">
admin </td>
<td class="noneed views-field-editablefield">
<div><div id="editablefields-field-company" class="editablefield-item editablefield-processed"><div class="field field-name-field-company field-type-list-text field-label-hidden compbutton"><div class="field-items"><div class="field-item even">C2</div></div></div><input class="editablefield-edit editablefield-edit-hover form-submit ajax-processed" type="submit" id="edit-field-company-0-actions-edit" name="edit-field_company-0" value="Edit this field" style="display: none;">Edit this field</div></div> </td>
</tr>
</tbody>
</table>
<div class="form-actions form-wrapper" id="edit-actions"><input type="submit" id="edit-submit" name="op" value="Save" class="form-submit"></div></div></form></div> </div>
</div> </div>
`
Any advise for a new coder would be great. Thanks
I have tried css display none
I have tried adding classes to the field in both form and drupal views

validate html5 two submit buttons .net

I have a master page with a form field and a page with form fields in asp.net using html5 validation. Both sets of form fields have a submit button. I am aware that they are on the same form once the page is compiled.
My problem is that all of the fields require validation. I am using the required="required" attribute. I prefer not to use the group validation from c#.
I need one field to be submitted if one button is selected and the other 3 fields to be submitted if the other button is selected. As of right now, if either button is submitted, ALL form fields must be filled out. One of the form fields and button is in the master page for a newsletter subscription and the other fields and button are on a page.
Any help would be greatly appreciated.
Thanks,
Justice
Page Code:
<div class="form-group">
<input runat="server" type="text" placeholder="Enter Email" name="register_email" id="register_email" class="form-control" required="required" />
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<input runat="server" type="text" placeholder="Enter Phone" name="register_phone" id="register_phone" class="form-control" required="required" />
</div>
</div>
<div class="col-sm-12">
<div class="form-group text-center">
<button runat="server" data-loading-text="Please wait..." class="btn btn-dark btn-theme-colored btn-sm btn-block mt-20 pt-10 pb-10" id="submit2" name="submit2" onServerClick="Submit_Click2">Send Now</button>
</div>
</div>
Mater Page Code:
<div class="input-group">
<input runat= "server" name="emailOut" id="emailOut" placeholder="Your Email" class="form-control input-lg font-16" data-height="45px" />
<span class="input-group-btn">
<button runat="server" data-height="45px" class="btn btn-colored btn-theme-colored btn-xs m-0 font-14" type="submit" id="submit" name="submit" onServerClick="Submit_Click" formnovalidate="formnovalidate" >Get Started</button>
</span>
</div>

Wordpress Search Form - Replace "Search" text with icon

I'm trying do a few customizations to the wordpress default search form and I would like to replace the text "Search" in the value="Search" string with an icon.
Currently I have the following form:
<form role="search" method="get" id="searchform" class="searchform" action="//example.com/">
<div class="box">
<div class="container-1">
<input type="text" value="" name="s" id="s" placeholder="Search..." />
<input type="submit" id="searchsubmit" value="Search" />
</div>
</div>
</form>
How can I put in the following icon instead? <i class="fa fa-search"></i>
Here is a bit of a workaround, I replaced the input with button, removed value completely
<form role="search" method="get" id="searchform" class="searchform" action="//example.com/">
<div class="box">
<div class="container-1">
<input type="text" value="" name="s" id="s" placeholder="Search..." />
<button type="submit" id="searchsubmit" />
<span class="icon"><i class="fa fa-search"></i></span>
</button>
</div>
</div>
</form>
Form seems to work just fine ..

Bootstrap Form FIle input

I'm having a problem with my form. The browse button in the file input can't be seen as a whole. Here is the screenshot:
And my code:
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-image fa-fw"></i> Photo List </h3>
</div>
<div class="panel-body">
<form action="upload-photo.php" method="POST" enctype="multipart/form-data">
<div class="form-group">
<label for="file">Upload Photo</label>
<input class="form-control" type="file" id="file" name="files[]" multiple="multiple" accept="image/*" />
<p class="help-block">Example block-level help text here.</p>
</div>
<button type="submit" name="uploadp_btn" class="btn btn-primary">Upload!</button>
</form> <hr />
</div>
</div>
Am I missing something? Thank you.
Add the following CSS to your style sheet:
.form-control{
height: auto;
}
http://www.bootply.com/NMVB2TeaK2
Tested that one in Chrome and Firefox, seems to be working!
I think you need to use class name 'filestyle' instead of 'form-control'
<input class="filestyle" type="file" id="file" name="files[]"
multiple="multiple" accept="image/*" />

Aweber Email Form Won't Display Inline

Working on a form with Bootstrap CSS, have the form class as "form-inline", but for some reason, the form refuses to actually display inline.
Here's a fiddle, showing the problem:
http://jsfiddle.net/5wBzE/
Here's the HTML:
<iframe id="AweberFormSubmitFrame" style="display: none" name="AweberFormSubmitFrame" src="about:blank"></iframe>
<form id="before_header" target="AweberFormSubmitFrame" method="post" class="form-inline" action="http://www.aweber.com/scripts/addlead.pl">
<div style="display: none;">
<input type="hidden" name="meta_web_form_id" value="2074084490" />
<input type="hidden" name="meta_split_id" value="" />
<input type="hidden" name="listname" value="foreverjobless" />
<input type="hidden" name="redirect" value="http://www.aweber.com/thankyou.htm?m=default" id="redirect_f916c5c4ae42ade190efaef62fd11c16" />
<input type="hidden" name="meta_adtracking" value="FJ:_Header" />
<input type="hidden" name="meta_message" value="1" />
<input type="hidden" name="meta_required" value="email" />
<input type="hidden" name="meta_tooltip" value="" />
</div>
<div class="af-element">
<div class="form-inline">
<input class="text form-control" id="awf_field-60198198" type="text" name="email" value="" tabindex="500" />
</div>
<div class="af-clear"></div>
</div>
<div class="af-element buttonContainer">
<button name="submit" onClick="return _submit_form_header(this.form);" class="submit btn btn-primary btn-lg" type="submit" value="Submit" tabindex="501">Subscribe</button>
<div class="af-clear"></div>
</div>
</div>
</div>
<div style="display: none;">
<img src="http://forms.aweber.com/form/displays.htm?id=TAzsLAwcLCycDA==" alt="" />
</div>
</form>
<div id="after_header" style="width:99%;border:gray 1px solid;display:none;background-color:#ccc;Padding:5px;height:100px;">Thank you</div>
Any tips or pointers in the right direction is appreciated!
Solved this by taking out the unnecessary aweber divs.

Resources