JForm

91 views
Skip to first unread message

Sven Schultschik

unread,
May 9, 2012, 2:31:22 PM5/9/12
to joomla-de...@googlegroups.com
Aloha,

I'm using the new jform class and want to generate a calendar field. It works till the thing that the today date is not shown on loading. I've found $this->value == now in the code so I tried to use that but several ways I tried didn't work …

<field
                    type="calendar"
                    name="name"
                    id="name"
                    label="label"
                    required="true"
                    value="NOW">now</field>

Can someone point me to the missing thing?

Prasit Gebsaap

unread,
May 10, 2012, 3:12:37 AM5/10/12
to joomla-de...@googlegroups.com
Hi,

Hi,

You should put the value in your model code, you can override getItem() to modify your data or preprocessForm() to modified your form or data.

You can use $form->setFieldAttribute($field, $name, $value) to acheive what you want.




--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.



--
Prasit Gebsaap
 
Nonthaburi, Thailand
 

Sven Schultschik

unread,
May 10, 2012, 3:55:31 AM5/10/12
to joomla-de...@googlegroups.com
Aloha again,

throw some code reading in the night I found out that it have to be

default="now"

then it works perfectly.

I think someone should generate a wikipage where the possible XML values for the fields are listed, or?

regards

Sven

2012/5/10 Prasit Gebsaap <prasit....@gmail.com>

elin

unread,
May 10, 2012, 6:57:53 AM5/10/12
to joomla-de...@googlegroups.com
You can be "someone" ..  just log in, search for the title you want, click on the link and start. Do as much as you wish and then other people will help finish. It will be an extremely useful page. 

Elin

On Thursday, May 10, 2012 3:55:31 AM UTC-4, svanschu wrote:
Aloha again,

throw some code reading in the night I found out that it have to be w


default="now"

then it works perfectly.

I think someone should generate a wikipage where the possible XML values for the fields are listed, or?

regards

Sven

2012/5/10 Prasit Gebsaap <prasit....@gmail.com>
Hi,

Hi,

You should put the value in your model code, you can override getItem() to modify your data or preprocessForm() to modified your form or data.

You can use $form->setFieldAttribute($field, $name, $value) to acheive what you want.



On 10 May 2012 01:31, Sven Schultschik <svenschultschik@googlemail.com> wrote:
Aloha,

I'm using the new jform class and want to generate a calendar field. It works till the thing that the today date is not shown on loading. I've found $this->value == now in the code so I tried to use that but several ways I tried didn't work …

<field
                    type="calendar"
                    name="name"
                    id="name"
                    label="label"
                    required="true"
                    value="NOW">now</field>

Can someone point me to the missing thing?

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-dev-general@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-general+unsub...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.



--
Prasit Gebsaap
 
Nonthaburi, Thailand
 

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-dev-general@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-general+unsub...@googlegroups.com.

Sven Schultschik

unread,
May 11, 2012, 5:39:11 AM5/11/12
to joomla-de...@googlegroups.com
Ok I started a new article. Don't know where to place it correctly …

http://docs.joomla.org/Components:jform_fields

I will fill it with the time beside my work with it and help would also be great ;)

e.G. someone who can write something about the filter value of the calendar?

regards

Sven

2012/5/10 elin <elin....@gmail.com>
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/t-_PEtDQe14J.

To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages