Change Add Entry Form in SOBI2 (Sigsiu)

Posted by: Jennifer Driller in Joomla

Ran into an issue recently where the client wanted to add some custom text on the Add Entry form in Sigsiu's SOBI2. SOBI2 is a directory component for Joomla. I thought I'd post how we did it.

I edited the file form.class.php located in the components/com_sobi2 folder.

Go to line 544 and here's what the original code looks like:

/*
* required fields info
*/
global $mosConfig_live_site;
$formTarget = "https:".substr($mosConfig_live_site,5)."/";
$this->myForm = $this->myForm."

 

"._SOBI2_FORM_FIELD_REQ_INFO."

";
if( isset( $this->item ) && is_a( $this->item, "sobi2" ) ) {
$formTarget .= "index.php?option=com_sobi2&sobi2Task=updateSobi";
}
else {
$formTarget .= "index.php?option=com_sobi2&sobi2Task=saveSobi";

 

Here's what the modified code looks like:

/*
* required fields info
*/
global $mosConfig_live_site;
$formTarget = "https:".substr($mosConfig_live_site,5)."/";

/* Added code for subscription details */
$this->myForm = $this->myForm."<p>The annual subscription cost for being in our directory is $1000.
<br/><ul>
<li>Being in the directory allows you to promote your products and services to our Users.</li>
<br><li>Being in the directory gives a 10% discount on banner advertising</li>
<br><li>Directory companies can also become developers and sell circuits designed by the company (i.e. with company components integrated)</li>
<br><li>Our users can sign up to receive RSS feeds from you, allowing you to stay in touch and promote news and product launches.</li>
</ul>
<font color='red'><strong>Companies who sign up during our beta launch period will receive the first year for free!</strong></font>
</p><p id='sobi2ReqFieldsInfo'>"._SOBI2_FORM_FIELD_REQ_INFO."</p>";
           if( isset( $this->item ) && is_a( $this->item, "sobi2" ) ) {
               $formTarget .= "index.php?option=com_sobi2&sobi2Task=updateSobi";
           }
           else {
               $formTarget .= "index.php?option=com_sobi2&sobi2Task=saveSobi";
           }


Trackback(0)
Comments (0)Add Comment

Write comment

security code
Write the displayed characters


busy