If it is a search question, from a html form, then you can add the query 
arguments using the “qargs”

Example, say you want to search for a publication date.
This date is then filled in in some form:

        <input type=“…” name=“qpublication_start” id=“…” value=“...” />

Then on the page (or postback) loaded via the form post you can use:

        {% print m.search[{query qargs}] %}

Note that the names of the input elements should be prefixed with “q”.

You can’t change an action tuple in the browser as they are serialized and 
signed by the server.
The easiest way to get extra information along is using the request query 
arguments.

- Marc



> On 07 Dec 2016, at 03:54, heiheshang <strangerfuture2...@gmail.com> wrote:
> 
> I ask about something else.
> 
>> publication_after=document.getElementById('id').value
> 
> 
> how to do so?
> 
> среда, 7 декабря 2016 г., 0:38:59 UTC+9 пользователь Marc Worrell написал:
> What is the m.ticket.morning?
> 
> I assume you want something from a certain day till now.
> 
> We have some special syntax you might want to use:
> 
> http://docs.zotonic.com/en/latest/developer-guide/search.html#date-start-after
>  
> <http://docs.zotonic.com/en/latest/developer-guide/search.html#date-start-after>
> 
> In this case we also have “today”
> 
> So you could do something like:
> 
>       publication_after=“today”
>       publication_before=“tomorrow"
> 
> The documentation is incomplete regarding the possible terms.
> You can check z_datetime:to_datetime/2 for more information.
> 
> - Marc
> 
> 
>> On 05 Dec 2016, at 11:38, heiheshang <strangerf...@gmail.com <javascript:>> 
>> wrote:
>> 
>>  {% with m.ticket.morning|date:"Y-m-d 
>> H:i:s":"Asia/Yakutsk",now|date:"Y-m-d":"Asia/Yakutsk"++" 23:59:59" as 
>> morning,evening %}
>>     {% for doc in m.search.paged[{query cat='schedule' 
>> publication_after=morning publication_before=evening}] %}
>> 
>> 
>> how to set the value of a variable 'morning' field html ?
>> 
>> -- 
>> 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Zotonic developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to zotonic-developers+unsubscr...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to zotonic-developers+unsubscr...@googlegroups.com 
> <mailto:zotonic-developers+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to zotonic-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to