Calling all my html experts, devs, community hackers etc....is there a way to automagically populate a private message subject using a link/button? For example, I have the following button...
<form action="/t5/notes/privatenotespage/tab/compose/note-to-user-id/41580" method="post"><button class="lia-button lia-button-primary" type="submit">Private Message Me</button></form>
...which would take you to the PM compose page...is there a way to insert a pre-selected/standard subject? In other words, we are trying to have a specific button/link auto-populate the PM subject, based on where the button is.
I know that we do this with Forum posts generated from our support site with the following url pattern:
https://community.virginmobileusa.com/t5/forums/postpage/choose-node/true?message-subject=abcdefg
but "message-subject" does not appear to be a valid parameter for a <form> element in my first example.
What am I missing?
Unlike forum post, you can not add message subject from URL. However, as a workaround you can get the subject value from URL and insert it to private message subject input using jQuery.
@BHall - Create a component and add it to Notes Compose page.
Freemarker
<#assign subject = http.request.parameters.name.get("message.subject", "")?html />
jQuery
$(document).ready(function(){ jQuery(".lia-form-subject-input.lia-form-type-text.lia-form-input-vertical").val("${subject}"); })
Once you will pass message.subject parameter with the subject, it will automatically be added to the subject input field.
e.g https://community.lithium.com/t5/notes/composepage/note-to-user-id/53021?message.subject=Subject%20of%20message
Welcome to the Technology board!
Curious about our platform? Looking to connect on social technology? You've come to the right place!