PrabuSS Posted October 7, 2016 Share Posted October 7, 2016 (edited) Hi I'm using PS native newsletter subscription module to get subscribers on my PS store. Currently its shows place holder text like "Enter your email" when users click email input box. I would like to show place holder text default before click. I believe its required to edit placeholder text script for newsletter subscription module to achieve this. Please help any one. Website : http://www.vinoble.hk/ PS version : 1.6.1.7 Home page screens attached. Edited October 7, 2016 by Prabukaran (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted October 7, 2016 Share Posted October 7, 2016 Did you alter the module's tpl in any way? By default, it should display.You also have a js error about that moduleblocknewsletter.js:5 Uncaught ReferenceError: msg_newsl is not definedIt might be causing the text to disappear Link to comment Share on other sites More sharing options...
PrabuSS Posted October 11, 2016 Author Share Posted October 11, 2016 Hi NemoPS Thanks for reply. My theme blocknewsletter.tpl file has code like as follows. It seems msg_newsl was already defined. I'm not user why its throws Not defined js error. Please help. <!-- Block Newsletter module--> <div id="newsletter_block_left" class="block"> <h4>{l s='JOIN US' mod='blocknewsletter'}</h4> <div class="block_content"> <form action="#" method="post"> <div class="form-group{if isset($msg) && $msg } {if $nw_error}form-error{else}form-ok{/if}{/if}" > <p style="font-weight:bold"> Sign up for news, events and deals.</p> <input class="inputNew form-control grey newsletter-input" id="newsletter-input" type="text" name="email" size="18" value="{if isset($msg) && $msg}{$msg}{elseif isset($value) && $value}{$value}{else}{l s='Enter your email' mod='blocknewsletter'}{/if}" placeholder="{l s='Enter your email' mod='blocknewsletter'}"/> <br/> <button type="submit" name="submitNewsletter" class="btn btn-default button button-small"> <span>{l s='Ok' mod='blocknewsletter'}</span> </button> <input type="hidden" name="action" value="0" /> </div> </form> </div> </div> <!-- /Block Newsletter module--> {strip} {if isset($msg) && $msg} {addJsDef msg_newsl=$msg|@addcslashes:'\''} {/if} {if isset($nw_error)} {addJsDef nw_error=$nw_error} {/if} {addJsDefL name=placeholder_blocknewsletter}{l s='Enter your e-mail' mod='blocknewsletter' js=1}{/addJsDefL} {if isset($msg) && $msg} {addJsDefL name=alert_blocknewsletter}{l s='Newsletter : %1$s' sprintf=$msg js=1 mod="blocknewsletter"}{/addJsDefL} {/if} {/strip} Link to comment Share on other sites More sharing options...
PrabuSS Posted October 12, 2016 Author Share Posted October 12, 2016 Did you alter the module's tpl in any way? By default, it should display. You also have a js error about that module blocknewsletter.js:5 Uncaught ReferenceError: msg_newsl is not defined It might be causing the text to disappear Hi NemoPS Thanks for reply. My theme blocknewsletter.tpl file has code like as follows. It seems msg_newsl was already defined. I'm not user why its throws Not defined js error. Please help. <!-- Block Newsletter module--> <div id="newsletter_block_left" class="block"> <h4>{l s='JOIN US' mod='blocknewsletter'}</h4> <div class="block_content"> <form action="#" method="post"> <div class="form-group{if isset($msg) && $msg } {if $nw_error}form-error{else}form-ok{/if}{/if}" > <p style="font-weight:bold"> Sign up for news, events and deals.</p> <input class="inputNew form-control grey newsletter-input" id="newsletter-input" type="text" name="email" size="18" value="{if isset($msg) && $msg}{$msg}{elseif isset($value) && $value}{$value}{else}{l s='Enter your email' mod='blocknewsletter'}{/if}" placeholder="{l s='Enter your email' mod='blocknewsletter'}"/> <br/> <button type="submit" name="submitNewsletter" class="btn btn-default button button-small"> <span>{l s='Ok' mod='blocknewsletter'}</span> </button> <input type="hidden" name="action" value="0" /> </div> </form> </div> </div> <!-- /Block Newsletter module--> {strip} {if isset($msg) && $msg} {addJsDef msg_newsl=$msg|@addcslashes:'\''} {/if} {if isset($nw_error)} {addJsDef nw_error=$nw_error} {/if} {addJsDefL name=placeholder_blocknewsletter}{l s='Enter your e-mail' mod='blocknewsletter' js=1}{/addJsDefL} {if isset($msg) && $msg} {addJsDefL name=alert_blocknewsletter}{l s='Newsletter : %1$s' sprintf=$msg js=1 mod="blocknewsletter"}{/addJsDefL} {/if} {/strip} Link to comment Share on other sites More sharing options...
NemoPS Posted October 21, 2016 Share Posted October 21, 2016 Strange, can you try something like{if isset($msg) && $msg} TEST! {addJsDef msg_newsl=$msg|@addcslashes:'\''}{/if}And see if the test text pops up? If not, msg is not defined or empty Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now