I have a form with the following fields.
Job Title
JobURLSlug
Job Descriptiong.
I want JobURLSlug to be a label field.
On update, I want to put Job Title in this function to Return the JobURLSlug (a search engine friendly url version of job title).
function generateSlug($phrase, $maxLength)
{
$result = strtolower($phrase);
$result = preg_replace("/[^a-z0-9s-]/", "", $result);
$result = trim(preg_replace("/[s-]+/", " ", $result));
$result = trim(substr($result, 0, $maxLength));
$result = preg_replace("/s/", "-", $result);
return $result;
}
Under programming I see I can add methods but I don’t see any examples of how to use this or specify variables.
Can someone show me the steps?
I created a Variable for the Job Title as var_job_title.
What is the format of inputing the parameters into the method? After that, how/where do I call the method?
I am a seasoned PHP programmer but learning the scriptcase interface is difficult. I would appreciate some help.