Webmastersite.net
Register Log In

Input multiple name problem

Comments on Input multiple name problem

jem71
Member

Usergroup: Member
Joined: Jan 11, 2004

Total Topics: 9
Total Comments: 24
jem71
Posted Jan 21, 2005 - 8:37 AM:

Hi, Im getting close to having things upgraded and working well so this is probably the last question!

Ive got a field I created called 'photothemes' - which is basically a multiple keyword description field. Previously (1.1.1) on the edit page I was using the following which worked perfectly:

Administration
Army

It would show ticked boxes for the keywords written in the photothemes field.

But with 2.13 it only seems to show 2 ticked boxes...If I add a third keyword to the field (eg. Work) and add another multiple name input, it will only ever show the first 2 keywords. I can shuffle them in any order and I only get 2.

Any ideas about this???
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jan 21, 2005 - 8:47 PM:

Presumably the same issue as was encountered and fixed in WSN Links a few weeks ago. Will be releasing fixed version within the next couple days.
jem71
Member

Usergroup: Member
Joined: Jan 11, 2004

Total Topics: 9
Total Comments: 24
jem71
Posted Jan 25, 2005 - 10:53 PM:

Paul,

Was the 2.14 version supposed to fix this problem??

I can now get it to show 3 keywords but no more.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jan 26, 2005 - 1:42 AM:

I can't duplicate any multi-checkbox issues in 2.14. However, I recall that the HTML you need to use in your template changed -- so for pre-existing custom fields, you'll need to go through the add fields page again to have it re-add the new html to the templates (don't remove the field if you want to keep the data, just re-add it won't harm anything as mysql will just ignore the request).
jem71
Member

Usergroup: Member
Joined: Jan 11, 2004

Total Topics: 9
Total Comments: 24
jem71
Posted Jan 26, 2005 - 7:51 AM:

Okay getting closer!

Now I can get 4 keywords to be selected using the new HTML but still no more

The following is the code it generated when I redid the field:

<input type="hidden" name="phototheme[123]" value="">
<input type="checkbox" name="phototheme[]" value="Berni" {IMAGECHECKED[phototheme <,> Berni]}> Berni

I dont know what the hidden field does (or its use of '123') but Im assuming its needed. One other thing I was using previously was: <input multiple
but it doesnt seem to make any difference here ( and I dont know where I got that from??)

Any other further advice.... I dont really want to go back to 1.1.1 but might have to if this doesnt work ;(
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jan 27, 2005 - 6:30 PM:

Is <input multiple> a valid html tag? I've never heard of it.

How many options do you have, for which only 4 work? My test with 5 seemed fine though I only checked two or three of them.
jem71
Member

Usergroup: Member
Joined: Jan 11, 2004

Total Topics: 9
Total Comments: 24
jem71
Posted Jan 27, 2005 - 9:23 PM:

No youre right <input multiple> probably isnt correct html, as I said I dont know where I got that from... but anyway Ive got up to 10 options selected ( they are all keywords) so perhaps try and select all 5 ( or create a few more ) and see whether they remain selected when you go back to edit the pic.
jem71
Member

Usergroup: Member
Joined: Jan 11, 2004

Total Topics: 9
Total Comments: 24
jem71
Posted Feb 06, 2005 - 4:51 AM:

Paul,

Any further idea about this problem??
Have you tried selecting more than 4??

Jeremy
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Feb 06, 2005 - 5:01 PM:

Open classes/onelink.php and change
 function checked($field, $value = false)
{
if ($this->field == '') return '';

to
 function checked($field, $value = false)
{
if ($this->$field == '') return '';
arn
Beginner

Usergroup: Customer
Joined: Mar 28, 2005

Total Topics: 4
Total Comments: 8
arn
#10 - Quote - Permalink
Posted Apr 09, 2005 - 11:30 AM:

Paul wrote:
Open classes/onelink.php and change
 function checked($field, $value = false)
{
if ($this->field == '') return '';

to
 function checked($field, $value = false)
{
if ($this->$field == '') return '';



Paul.

This error is still in the latest version of WSNLinks.

I had to make this change to get multi checkboxes to work.

arn
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
#11 - Quote - Permalink
Posted Apr 09, 2005 - 4:42 PM:

Noted, thanks.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.