We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How to edit existing plugin? | Forum

Chad
Chad Sep 17 '12
first of all, i am new to this plugin development,

i'm trying to add one more textfield to contactus page. (plugin Contact us )

according to the tutorial, i should be editing the following files.

1. file a: ow_plugins/contactus/controllers/contact.php
2. file b: ow_plugins/contactus/views/controllers/contact_index.html

file a:  inside index function add in
 
$fieldUrl = new TextField('url');
$fieldUrl->setLabel($this->text('contactus', 'form_label_url'));
$fieldUrl->setRequired();
$form->addElement($fieldUrl);



file b: duplicate table row

<tr class="ow_alt1">
        <td class="ow_label">{label name='url'}</td>
        <td class="ow_value">{input name='url'}{error name='url'}</td>
</tr>

the contact us page shows no changes, or this URL field doesnt appear.

other than the language, what are the necessary files i need to edit in order to make this additional field display in the contact us page.

and i like to add more field like "Name" , "phone" , is it possible?

Purusothaman Ramanujam
is it $this->text('contactus', 'form_label_url') or OW::getLanguage()->text('contactus', 'form_label_url')
Michael I.
Michael I. Dec 21 '12
Topic was moved from Plugins.