In-portal
In-portal Software
Your Language:






Custom fields and checkboxes - Topic Posts (16)



Rate Topic




Add To Favorites




Author Message

lhornaday
Member




Joined: 08/27/2004
posts: 41
Location: United States
Posted: 07/18/2005 2:23:00 AM


I am adding radio buttons and checkboxes to my profile page using the custom fields. The radio buttons are working perfectly. The checkboxes work, as in they make changes to the database, but I cannot return a 'checked' value to my form.

Here is the code for one of my checkboxes:

<inp:m_form_checkbox _field="fieldcustom_AMEL" _Form="m_acctinfo" type="check" _Value="1" Custom="1" />

Any Ideas?



Dmitry
admin




Joined: 01/05/2002
posts: 1502
Location: United States
Posted: 07/18/2005 11:57:39 AM


lhornaday : 07/18/2005 2:23:00 AM
I am adding radio buttons and checkboxes to my profile page using the custom fields. The radio buttons are working perfectly. The checkboxes work, as in they make changes to the database, but I cannot return a 'checked' value to my form.

Here is the code for one of my checkboxes:

<inp:m_form_checkbox _field="fieldcustom_AMEL" _Form="m_acctinfo" type="check" _Value="1" Custom="1" />

Any Ideas?


Hello lhornaday,

Did you try it this way?

<inp:m_form_checkbox _field="fieldcustom_AMEL&quot_Form="m_acctinfo&quotCustom="1&quot/>


Thanks.


lhornaday
Member

No Luck


Joined: 08/27/2004
posts: 41
Location: United States
Posted: 07/18/2005 1:29:30 PM


No Luck
It didn't work that way either

I am showing the custom field under the general tab in the admin panel and I can see that the changes are still being made through my form. I am using a drop-down menu in the admin panel to show if the box is checked or not:

1=lu_yes,0=lu_no

The In-tag library has this under m_form_checkbox :

_Value[bool] If true, the radio button is CHECKED

Should I have _Value="1" so that when the box has been checked, the statement is true and the checkbox will continue to be checked? I have tried it in several ways with no luck

Have checkboxes been tested with In-Portal? I am wondering if it is me or a bug.



Dmitry
admin

Re: No Luck


Joined: 01/05/2002
posts: 1502
Location: United States
Posted: 07/19/2005 12:08:17 PM


Re: No Luck
lhornaday : 07/18/2005 1:29:30 PM
It didn't work that way either

I am showing the custom field under the general tab in the admin panel and I can see that the changes are still being made through my form. I am using a drop-down menu in the admin panel to show if the box is checked or not:

1=lu_yes,0=lu_no

The In-tag library has this under m_form_checkbox :

_Value[bool] If true, the radio button is CHECKED

Should I have _Value="1" so that when the box has been checked, the statement is true and the checkbox will continue to be checked? I have tried it in several ways with no luck

Have checkboxes been tested with In-Portal? I am wondering if it is me or a bug.


Hello Luke,

I checked the code and tried it on my local version and everything seems to be just fine. Simply make sure to put the exact [b]customfield name in _Field as field parameter in that tag - no prefixes are necessary.

Thanks.


lhornaday
Member

Problem Solved


Joined: 08/27/2004
posts: 41
Location: United States
Posted: 07/19/2005 3:13:47 PM


Problem Solved
I renamed my custom filed in the admin panel and on the front end to a different name and it works

The problem I was having was going back later and not having all of the previous information retrieved from the database to prefill my custom fields in my form.

All I changed was fieldcustom_AMEL to fieldcustom_lowercaseletters

Then I did it with all 8 checboxes and a text field and got the same result. Go figure.

Radio Buttons and drop-down menus worked anyway.

All that matters is that it works and I'm happy once again

Thanks, and I'll be back if something breaks

- Luke
- http://allpilots.com


lhornaday
Member




Joined: 08/27/2004
posts: 41
Location: United States
Posted: 08/02/2005 1:22:19 AM


Please Anyone,

I'm back to square one. I am still trying to use the 'update profile' form to enter data into a user's custom fields.

I can display the value easily with <inp:m_user_field ..>

What I cannot do is get a form field to return a correct value. I can save information with my form but the next time I revisit, the form will not load the value. A text input box will preload "Array". It works well from the admin panel but not from the frontend.

See on the website through the 'My Profile' link:

http://allpilots.com
user:aaa
Pass: bbbbb

The input box will return 'array' while I have the actual value of the last submission displayed under it with: <inp:m_user_field _Field="custom" _Customfield="fieldcustom_types" />


- Luke


Dmitry
admin




Joined: 01/05/2002
posts: 1502
Location: United States
Posted: 08/02/2005 9:20:54 AM


lhornaday : 08/02/2005 1:22:19 AM
Please Anyone,

I'm back to square one. I am still trying to use the 'update profile' form to enter data into a user's custom fields.

I can display the value easily with <inp:m_user_field ..>

What I cannot do is get a form field to return a correct value. I can save information with my form but the next time I revisit, the form will not load the value. A text input box will preload "Array". It works well from the admin panel but not from the frontend.

See on the website through the 'My Profile' link:

http://allpilots.com
user:aaa
Pass: bbbbb

The input box will return 'array' while I have the actual value of the last submission displayed under it with: <inp:m_user_field _Field="custom" _Customfield="fieldcustom_types" />


- Luke


Hello Luke,

The code looks good to me. I might need an FTP access to your In-portal files to check this directly. You can submit it in a support ticket.

Thanks.


lhornaday
Member

Thanks


Joined: 08/27/2004
posts: 41
Location: United States
Posted: 08/07/2005 10:48:19 AM


Thanks
Dmitry

Thanks for your help! Did you fix my local machine though? I didn't notice any changes.




Dmitry
admin

Re: Thanks


Joined: 01/05/2002
posts: 1502
Location: United States
Posted: 08/08/2005 9:19:59 AM


Re: Thanks
lhornaday : 08/07/2005 10:48:19 AM
Dmitry

Thanks for your help! Did you fix my local machine though? I didn't notice any changes.



Hello Luke,

Yes I fixed it and replied in your ticket.

Thanks.


lhornaday
Member




Joined: 08/27/2004
posts: 41
Location: United States
Posted: 08/08/2005 7:37:26 PM


Thanks, I did see your reply in the ticket. I am just confused as to why my site still is not workng. I'll work on it a while longer tonight and hopefully come up with something.


Dmitry
admin




Joined: 01/05/2002
posts: 1502
Location: United States
Posted: 08/09/2005 4:51:53 PM


lhornaday : 08/08/2005 7:37:26 PM
Thanks, I did see your reply in the ticket. I am just confused as to why my site still is not workng. I'll work on it a while longer tonight and hopefully come up with something.


Luke,

Please be more specific about what is not working. Is it the same thing?

Thanks.


lhornaday
Member




Joined: 08/27/2004
posts: 41
Location: United States
Posted: 08/09/2005 8:27:43 PM


Yes, the same thing. Have a look at the site. The login information is given in a post above. Go to the 'My profile' link after logging in. Under the cuutom fields heading I have an input box that I am trying to use. The input box return "Array" every time even though it will save in the database whatever you type. revisit te form after submitting and "Array" will be there. Underneath that input box I am using the following code to return the value of the same custom field and it is working fine.
Here is the HTML I am using in my_info.tpl

<tr>
        &
lt;td CLASS="field-name">
        &
lt;inp:m_language _Phrase="lu_title_Typeratings&quot/></td>
        &
lt;td class="field-content-input">
        &
lt;inp:m_form_input _field="fieldcustom_types&quot_Form="m_acctinfo&quottype="text" class="input&quotstyle="width:250px;&quot/>
        &
lt;inp:m_user_field _Field="custom&quot_Customfield="fieldcustom_types&quot/>        
        &
lt;/td>
        &
lt;/tr>



Dmitry
admin




Joined: 01/05/2002
posts: 1502
Location: United States
Posted: 08/10/2005 10:07:37 AM


lhornaday : 08/09/2005 8:27:43 PM
Yes, the same thing. Have a look at the site. The login information is given in a post above. Go to the 'My profile' link after logging in. Under the cuutom fields heading I have an input box that I am trying to use. The input box return "Array" every time even though it will save in the database whatever you type. revisit te form after submitting and "Array" will be there. Underneath that input box I am using the following code to return the value of the same custom field and it is working fine.
Here is the HTML I am using in my_info.tpl

<tr>
        &
lt;td CLASS="field-name">
        &
lt;inp:m_language _Phrase="lu_title_Typeratings&quot/></td>
        &
lt;td class="field-content-input">
        &
lt;inp:m_form_input _field="fieldcustom_types&quot_Form="m_acctinfo&quottype="text" class="input&quotstyle="width:250px;&quot/>
        &
lt;inp:m_user_field _Field="custom&quot_Customfield="fieldcustom_types&quot/>        
        &
lt;/td>
        &
lt;/tr>


Hello Luke,

Note, it worked on Aug-06-2005 and doesn't now because the file was overwritten by you on Aug-09-2005. It's a second time I am changing this in your kernel/parser.php file. Please be more careful next time.

Thank you.


lhornaday
Member

Thank You!


Joined: 08/27/2004
posts: 41
Location: United States
Posted: 08/10/2005 11:35:33 PM


Thank You!
Thanks for the great support Dmitry. that's why I will continue to be a customer


lhornaday
Member

Upgrade


Joined: 08/27/2004
posts: 41
Location: United States
Posted: 09/02/2005 6:17:21 PM


Upgrade
I did not see a fix to this problem with version 1.1


To anyone with similar problems, this is what worked in the last version. Change the following in the kernel/parser.php

$u->LoadCustomFields();
       if(
is_array($u->CustomFields))
       {       
         foreach(
$u->CustomFields as $f=>$v)
           {             
$FormValues[$FormName][$f] = $v;             
           }
       }
    break;

to:
$u->LoadCustomFields();
       if(
is_array($u->CustomFields))
       {       
         foreach(
$u->CustomFields as $f=>$v)
           {             
                if 
is_array($v))
                     
$FormValues[$FormName][$f] = !empty($v['lang_value'])? $v['lang_value'] : $v['value'];
                 else
                     
$FormValues[$FormName][$f] = $v;             
           }
       }
    break;





Page:  1 2   Items Per Page: