Jump to content

Recommended Posts

Posted

Hi. I am a Russian user and do not quite understand English (I use a translator). 

I need help in creating a form on a demo site Skyscraper Search. Good to see the template with html and php code.

Posted

Glad you got it sorted. Yes, "site/profile" modules are different from your "normal" modules and need to be installed as a fresh site install...(hope this makes sense to others - Monday blues!)

  • Like 3
Posted

Glad you got it sorted. Yes, "site/profile" modules are different from your "normal" modules and need to be installed as a fresh site install...(hope this makes sense to others - Monday blues!)

Thank you

Posted

For that I'd suggest using a multiple selection field rather than a single selection field. The simplest examples would be a <select multiple> or checkboxes. You can tell PHP to submit the result as an array by appending "[]" to the field name, i.e.

<select multiple name='something[]'>
  <option value='1'>One</option>
  <option value='2'>Two</option>  
  <option value='3'>Three</option>
</select>

From the PHP side, you can retrieve it like this:

if(!empty($input->get->something)) {
  foreach($input->get->something as $value) {
    $value = (int) $value; 
    // $value contains either: 1, 2, or 3
  }
}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...