Keyword

Populate Subject Input Field in K2Contact plugin.

  • jmcruznet
  • jmcruznet's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 1 week ago #100102 by jmcruznet
I added the plugin for K2 the K2Contact and added them on every item, So it will be easy for the viewers to ask info or quotation on the items. But i wanted the Subject Input Field to be auto populate it's field with the current item title, So the subject of the submitted form will always be the title of the inquired items.

 

How will i call the title of the item where the form was filled-up? I have this codes in contact.php

 

'.JText::_('PLG_LABEL_SUBJECT').'          <input type="text" name="subject" id="subject" value="'.$_POST.'" />          <br />

 

I already tried different syntax [listed below] 

 


<input type="text" name="subject" id="subject" value="'.$_POST.$this->item->title.[/code]'].'" />

     2.  <input type="text" name="subject" id="subject" value="'.$_POST.'" />

 

     3. <input type="text" name="subject" id="subject" value="'.$_POST['
$this->item->params->get('itemTitle')
'].'" />

 

What else should i try to call the item title on the value=""

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum