1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

What is in the $data array? [FormAPI]

Discussion in 'Development' started by bruno99, Jan 29, 2018.

  1. bruno99

    bruno99 Spider

    Messages:
    12
    GitHub:
    udachin26
    Example code $data[0]:
    PHP:
    switch($data[0]){//buttons
      
    case 0:
      case 
    1:
    }


     
    Last edited: Jan 29, 2018
  2. armagadon159753

    armagadon159753 Zombie

    Messages:
    217
    GitHub:
    armagadon159753
    case 0: The First button
    case 1: The Second button
    case 2: The the third button
    Etc....
     
  3. MioTaku

    MioTaku Witch

    Messages:
    69
    GitHub:
    uselesswaifu
    What if its a custom form? Would each element still be in order.. Would a Label also add to the index.
     
    SOFe and DaPigGuy like this.
  4. armagadon159753

    armagadon159753 Zombie

    Messages:
    217
    GitHub:
    armagadon159753
    If it's an CustomFrom if I remember fine $data != 0 but if you need an exempt I here :D
     
  5. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    That's why FormAPI has a terrible API :oops:
     
  6. armagadon159753

    armagadon159753 Zombie

    Messages:
    217
    GitHub:
    armagadon159753
    Absolutely agree
     
  7. AshBull

    AshBull Spider Jockey

    Messages:
    31
    At least it can be used with master pmmp :p
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.