OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



utilize html_select_date

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page.

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a technical support question, try the OJS Technical Support subforum.

utilize html_select_date

Postby jjgitties » Mon Jul 21, 2014 9:54 am

Hi, I am trying to make use of the html_select_date custom function in a form for a tpl page.

Is there a correct way to get output from function. Everything I have tried, it does not return any values.

My code is below:

tpl file
Code: Select all
<form method="post" name="search" id="search" action="{url page="page" op="search"}">
        From:
    {html_select_date prefix="start" all_extra="class=\"selectMenu\"" start_year="$yearOffsetPast" end_year="$yearOffsetFuture" time="$start"}
        <input type="submit" name="start" value="{translate key="common.search"}" class="button defaultButton" />
</form>


In the handler
Code: Select all
$start = Request::getUserVar('start') ? Request::getUserVar('start') : "null";
print $start . "<br>";


I tried start and search and no output.
jjgitties
 
Posts: 20
Joined: Tue Nov 12, 2013 11:11 am

Re: utilize html_select_date

Postby asmecher » Mon Jul 21, 2014 10:00 am

Hi jjgitties,

Use Request::getUserDateVar instead of Request::getUserVar.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8857
Joined: Wed Aug 10, 2005 12:56 pm

Re: utilize html_select_date

Postby jjgitties » Mon Jul 21, 2014 11:54 am

I will try that right now.
jjgitties
 
Posts: 20
Joined: Tue Nov 12, 2013 11:11 am


Return to OJS Development

Who is online

Users browsing this forum: No registered users and 2 guests