PDA

View Full Version : Agreement Field with URL



Oslo
February 8, 2013, 06:58 PM
How can make Agreement Field with URL to open www.mydomain.com/privacy-police.html, I mean Check box and beside check box shows (Yes I have read and agree to the following privacy police) and when they click on privacy police open in new windows page www.mydomain.com/privacy-police.html.

Look Image.

368

Chris Brown
February 8, 2013, 10:50 PM
If you go to admin / account types / choose and build registration form.....here you can add an agreement field (there should be one set up already in account fields, if not you can add it in account fields section)

add it to the form and it will show on signup but on the 2nd page of signup where the user fills in the personal details.

Oslo
February 9, 2013, 10:51 AM
I know about agreement field that are placed in Account field, but this looks very bad shows every content in textarea, did looked on my first post images?

http://www.flynax.com/forum/attachment.php?attachmentid=368&d=1360349782

Dmitry
February 12, 2013, 08:56 AM
Hello Oslo,

I know about agreement field that are placed in Account field, but this looks very bad shows every content in textarea, did looked on my first post images?


You can do it via admin panel.
admin panel > languages > search by key "accept" after find phrase you need to change it.


"I accept"
on
"I accept <a href='http://www.mydomain.com/privacy-police.html'> privacy-police </a>"


It is all.
Thanks.

Oslo
February 12, 2013, 01:37 PM
Now I added the code into language key, but still show textarea, I wanna hide textarea just wanna check box with a link.

Dmitry
February 13, 2013, 03:42 AM
Hello Oslo,


Now I added the code into language key, but still show textarea, I wanna hide textarea just wanna check box with a link.

You need to change in the code.
FTP > templates > your template > tpl > blocks > reg_account.tpl - it is file for registration accounts
FTP > templates > your template > tpl > blocks > field.tpl -it is file for add listings
Open and find code:


{elseif $field.Type == 'accept'}
<textarea .....


You need to add the class 'hide'. Save and update file on server.

Thanks.

Oslo
February 13, 2013, 04:45 AM
Thank you Dmitry, working as I wanted :)

Viktor
February 13, 2013, 04:57 AM
Hello Oslo,

Hey People you didn't understand Oslo want see link with additional page instead of textarea for agreement field.

Dmitry start correct code but needs some more.

go to:
FTP > templates > your template > tpl > blocks > reg_account.tpl - it is file for registration accounts
FTP > templates > your template > tpl > blocks > field.tpl -it is file for add listings



{elseif $field.Type == 'accept'}
<textarea rows="6" readonly="readonly" name="{$field.Key}">{$lang[$field.pDefault]}</textarea><br />
[html]

and replace to:

[html]
{elseif $field.Type == 'accept'}
<textarea rows="6" readonly="readonly" class="hide" name="{$field.Key}">{$lang[$field.pDefault]}</textarea><br />


and after:
<label><input type="checkbox" name="f[{$field.Key}]" value="yes" /> {$lang.accept}</label>
add new:


<a href="http://www.mydomain.com/privacy-police.html" target="_blank" class="static">{$lang.any_text_key}</a>

and then you should go to admin panel >> Languages and add new phrase in system with your new key: any_text_key and any value like you want.
save files and check.

Oslo
February 13, 2013, 05:46 AM
Viktor, your way I tried in Mobile Version, worked perfect without any problem, thank you 2.

Petrache Nicolae
December 27, 2013, 08:43 PM
great. i was looking for this. Thanks Dmitry and Viktor

Petrache Nicolae
December 27, 2013, 09:25 PM
Hello Oslo,

Hey People you didn't understand Oslo want see link with additional page instead of textarea for agreement field.

Dmitry start correct code but needs some more.

go to:
FTP > templates > your template > tpl > blocks > reg_account.tpl - it is file for registration accounts
FTP > templates > your template > tpl > blocks > field.tpl -it is file for add listings



{elseif $field.Type == 'accept'}
<textarea rows="6" readonly="readonly" name="{$field.Key}">{$lang[$field.pDefault]}</textarea><br />
[html]

and replace to:

[html]
{elseif $field.Type == 'accept'}
<textarea rows="6" readonly="readonly" class="hide" name="{$field.Key}">{$lang[$field.pDefault]}</textarea><br />


and after:
<label><input type="checkbox" name="f[{$field.Key}]" value="yes" /> {$lang.accept}</label>
add new:


<a href="http://www.mydomain.com/privacy-police.html" target="_blank" class="static">{$lang.any_text_key}</a>

and then you should go to admin panel >> Languages and add new phrase in system with your new key: any_text_key and any value like you want.
save files and check.

does this work for 4.2 as well? i followed the steps and
<label><input type="checkbox" name="f[{$field.Key}]" value="yes" /> {$lang.accept}</label> doesn't exist in this form in those 2 fields, i applied the changes like this

{elseif $field.Type == 'accept'}
<textarea rows="6" readonly="readonly" class="hide" name="{$field.Key}">{$lang[$field.pDefault]}</textarea><br />
<input type="hidden" name="account[{$field.Key}]" value="no" />
<label><input type="checkbox" name="f[{$field.Key}]" value="yes" /> {$lang.accept}<a href="http://xxx" target="_blank" class="static">{$lang.termeni_conditii}</a></label>
{/if}

and the look is fine, i can tick the box but when i try to save it, i get the worning that i must agree to the terms (wich obviously i did by ticking the box)

Petrache Nicolae
December 27, 2013, 09:29 PM
this worked for me in the end


{elseif $field.Type == 'accept'}
<textarea style="width: 80%;" rows="6" cols="" readonly="readonly" class="hide" name="{$field.Key}">{$lang[$field.pDefault]}</textarea><br />
<input type="hidden" name="account[{$field.Key}]" value="no" />
<label><input type="checkbox" name="account[{$field.Key}]" class="policy" value="yes" /> {$lang.accept}<a href="http://www.xxx.html" target="_blank" class="static">{$lang.termeni_conditii}</a></label>
{/if}

will test it next days to see if is ok