Dan

Auto fill form for tip user custom edit

Recommended Posts

Hi,

I have added the following edit to the post container to help provide the function to tip a user based on their post:

<!-- tip user custom edit -->
<div class="ipsGrid_span4 ipsPad">
	<a class="ipsButton ipsButton_important ipsButton_fullWidth ipsButton_small" data-ipsdialog="" data-ipsdialog-title="Tip user" href="https://forum.stake.com/index.php?app=points&amp;module=points&amp;controller=dashboard&amp;do=send&amp;curr=1&amp;bank=0&amp;bal=1" title="Tip user" id="ips_uid_5636_3"><i class="fa fa-user"></i>&nbsp;&nbsp; Tip user</a>
</div>

I was just wondering if there was a way to autocomplete the "send to:" input, based on the post author.

image.png.d313428450a19750de84308cb36b33f6.png

Share this post


Link to post
Share on other sites

Here's my hacky attempt with jquery that doesn't work, any assistance is appreciated!
 

<!-- tip user custom edit -->
<script>
	$('#tipUser').click(function() {
		$('#elInput_points_dash_transfer_member_dummyInput').val( "{$comment->author()->name}" );
	});
</script>
<div class="ipsGrid_span4 ipsPad"> 
	<a class="ipsButton ipsButton_important ipsButton_fullWidth ipsButton_small" data-ipsdialog="" data-ipsdialog-title="Tip user" href="https://forum.stake.com/index.php?app=points&amp;module=points&amp;controller=dashboard&amp;do=send&amp;curr=1&amp;bank=0&amp;bal=1" title="Tip user" id="tipUser"><i class="fa fa-user"></i>&nbsp;&nbsp; Tip {$comment->author()->name}</a>
</div>

 

Edited by Dan

Share this post


Link to post
Share on other sites

Check this topic: 

 

I think the most elegant way will be once Rules support reactions. Then you can add a custom reaction for points transfer, but alas, it doesn't look like it will happen anytime soon. 

 

Edited by jair

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.