ALTER TABLE `kjd_teammembers` ADD `test` TEXT NOT NULL
Cheers,
Sam Moffatt
http://pasamio.id.au
> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! General Development" group.
> To view this discussion on the web, visit
> https://groups.google.com/d/msg/joomla-dev-general/-/W_mYh9iVvooJ.
>
> 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.
> To post to this group, send an email to joomla-dev-general@googlegroups.com.
> To unsubscribe from this group, send email to
Strings and numbers are rather much straight forwards, the norm there
is easy to determine however when you're dealing with multi-valued
fields you've got to make some decisions there on how that gets
stored.
Perhaps a tutorial on how to do this with an example might be useful
to point people to documentation however this is really not a JForm
specific topic, it's really a data modelling issue relevant for people
who may not even wish to use JForm.
Cheers,
Sam Moffatt
http://pasamio.id.au
>> > 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.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! General Development" group.
> To view this discussion on the web, visit
> https://groups.google.com/d/msg/joomla-dev-general/-/rqiSxt1F-9EJ.
>
> 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.
Cheers,
Sam Moffatt
http://pasamio.id.au
> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! General Development" group.
> To view this discussion on the web, visit
> https://groups.google.com/d/msg/joomla-dev-general/-/BddQe5j5kEEJ.
> To post to this group, send an email to joomla-dev-general@googlegroups.com.
> To unsubscribe from this group, send email to
Thanks for volunteering! Since you now appear to have a great grasp of
the subject, I strongly encourage you to check out
http://docs.joomla.org, sign up and create the documentation that you
feel would have helped you diagnose this situation sooner. Having just
spent three days you know all of the pitfalls and are in one of the
strongest positions to ensure that any issues or gotchas are covered
in the documentation that you write.
Look forwards to seeing your contribution.
Cheers,
Sam Moffatt
http://pasamio.id.au
> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! General Development" group.
But if you think that solution from this topic is good enough, and that
my english is good enough, i'll be glad to write it to joomla docs wiki.
As working with other CMS's, i'm working on whatever my clients need.
I'm not one of those that will praise one thing just bcause i like it.
Every other CMS has it's own pitfalls, payd or free, but that doesnt
make this situation better or worse. What can make one CMS better than
next one is knowlage about where pitfall is. If you know it exists and
if you know where it is, than you can plan ahead and jump over it.
Reality is that documentation about "checkboxes" is non existant and it
would feel much better if those that created it would write something
about it....even "This feture is not "finished solution" like
"textfield" feature and needs custom save/load/whatever functions (i
dont even know list of functions that should be created) to be able to
store/load data to/from database."
Even that sentence in joomla docs would save alot of people alot of
their working/free time.
As i said...if you think that that kind of submitions are OK for joomla
docs, you can expect my to add in stuff whenever i end up in dead ends
like this.
--
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.
To unsubscribe from this group, send email to joomla-dev-general+unsubscribe@googlegroups.com.
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
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/xMLHG2fa6vQJ.
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.
--
Please keep the Subject wording in your answers
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
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/xMLHG2fa6vQJ.
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.
Does anyone have any expirience with using checkboxes (not checkbox) field type in development of Joomla components in backend?
What i ahve now is in form XML:
<field
name="team_ids"
type="checkboxes"
label="Team"
description="Select one more more teams in which this user is member">
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</field>
It renders nicely in view using this piece of code:
....
<li>
<?php echo $this->form->getLabel('user_id'); ?>
<?php echo $this->form->getInput('user_id'); ?>
</li>
...
My question is, what type should be clumn in database that can store information about which checkbox is selected and which is not?
I googled alot for this answer but i couldnt find anything about it anywhere...
Perhaps the misunderstanding comes from the belief that the database
layer should be coupled to the form layer - or is in fact coupled. The
reality is that there is no coupling between the form definitions used
to render the data and the models and table structures used to persist
them.
There are examples in the system of how to persist multivalued fields
to the database. The module manager has an example of how you can use
a mapping table to persist multivalued data (module menu assignment).
The params stored throughout the system use a JSON format (previously
INI) which is also a valid way to store data.
The problem is that there isn't a definitive way to store a
multivalued or complex field. There is really one way to store a
string or a number. I think it simply comes down to the fact that at
least on my machine when I do "echo array('pies')" I get "Array" in
response. Should the persistence layer automatically assume that if it
got an array that it should JSON encode it? How does it know which
fields it should JSON decode then? Does it sniff for it? What happens
when you store JSON then in a field that you don't want automatically
decoded for you? For example someone inputs raw JSON into the content
manager's text field then randomly com_content starts getting an
object back instead of the string it wanted. Do you then couple your
persistence layer to your form layer? This provides an interesting
question of what happens when you don't want to have a form for
whatever reason. Though a JTableForm could certainly be done where you
pass in a form definition some how (constructor?) and it then parses
the XML to determine whats multivalued or not and then persists it
using JSON serialisation but that sounds like a lot of overhead for
saving five lines of code occasionally and still doesn't solve what
happens when you need to override that behaviour anyway and store it
as CSV, XML, INI or in a distinct table.
Cheers,
Sam Moffatt
http://pasamio.id.au
>>> 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.
>>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! General Development" group.
> To view this discussion on the web, visit
> https://groups.google.com/d/msg/joomla-dev-general/-/xMLHG2fa6vQJ.
>
> 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.
>>> To unsubscribe from this group, send email to
>>> For more options, visit this group at
>>> http://groups.google.com/group/joomla-dev-general?hl=en-GB.
>>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! General Development" group.
> To view this discussion on the web, visit
> https://groups.google.com/d/msg/joomla-dev-general/-/xMLHG2fa6vQJ.
>
> To post to this group, send an email to joomla-dev-general@googlegroups.com.
> To unsubscribe from this group, send email to