Menu

Checkbox Help...

Help
2011-03-04
2012-06-07
  • Christopher Cooley

    I've tried to figure out how to insert checkboxes without success. For some
    reason it just won't store the information and echo it back when I go back in
    to edit the contact. I have other custom fields working fine, but not
    checkboxes. I'm not storing the checkboxes in an array either. Any pointers?

     
  • chatelao

    chatelao - 2011-03-04

    Be careful: Checkboxes may be arrays in PHP, not just flat text.

    Regards O.

     
  • Christopher Cooley

    Yes, but I was unable to figure out how to create an array for it to function
    correctly within the existing code. Instead I just created individual database
    fields for each check mark. I know this is not a very efficient method of
    achieving this, but I'm on a tight schedule to come up with something.

    Chatelao, what type of database fields should I create for this? Right now I'm
    just using VARCHAR(256) not null. Any help on this would be highly
    appreciated.

     
  • chatelao

    chatelao - 2011-03-05

    Hi, depends on the kind of data you want to store and if you want to import
    some data.

    btw: what kind of checkboxes are you adding to the application?

    Regards O.

     
  • Christopher Cooley

    Thanks, Chatelao. I have a custom field called "Positions Applied for:", and
    it has check marks for Painter, Sandblaster, Helper, etc. You place a check
    next to all the positions this person has applied for.

    I've not tried to store this in an array due to the lack of "know-how". I've
    tried several different field types in the database and am unable to make this
    work. I don't know where my error is. I'm only editing edit.php and
    address.class.php. It's not really necessary to import/export this
    information, but it would be nice.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.