I just changed some of the wording on the the submit story form and the language file to make it so the same form could be used for e-mails or to submit stories.
To make e-mail address required I did the following in the addsubmissionaction.class php file:
Deleted the following:
- Code: Select all
$this->_userEmailAddress = $this->_request->getValue( "userEmailAddress" );
and replaced it with:
- Code: Select all
$this->_userEmailAddress = $this->_request->getValue( "userEmailAddress" );
$val1 = new StringValidator();
if( !$val1->validate( $this->_userEmailAddress )) {
$errors["userEmailAddress"] = true;
$message["userEmailAddress"] = $this->_locale->tr("error_submission_no_email");
}
This requires adding 'error_submission_no_email' message in language file.
Also requires
- Code: Select all
{if $errors.userEmailAddress}<span style="background:red;color:white;font-weight:bold"> ! </span> {$message.userEmailAddress}</p>{/if}
being added in the submitform.template
Note: Users must select a category for the form to work, so I just put a note for them to select any category if they are just submitting an e-mail.
After doing all of the above I just put in the header of each template | Contact Us | with a link to the submit story template.
