Forum Replies Created

Viewing 15 replies - 61 through 75 (of 191 total)
  • This will work

    Set field at numeric
    Put this in the Attribute field
    min::13,max::19,step::any

    Thread Starter supernova42

    (@supernova42)

    I made the change in the database to get what I wanted. I just think to have some type of formatting option within Manage DataBase Fields would be good.

    Thanks

    Thread Starter supernova42

    (@supernova42)

    okay thanks

    supernova42

    (@supernova42)

    Select it from the Form Element drop down in Manage Database Fields.

    Thread Starter supernova42

    (@supernova42)

    The javascript I’m using Roland is the one from the link you provided.

    i.e. Dropdown Selectors: limit selections based on another selector.

    Do you know of any problems with at script?

    Thanks

    Thread Starter supernova42

    (@supernova42)

    I’ve found the problem Roland – Browsers!!!

    It works with Firefox, Chrome on my iMac.
    It doesn’t work on Safari on my iMac.

    I’ve tried differents templates and the result is the same.

    I’ve tried Firefox, Chrome, Safari on my iPad and it doesn’t work with any of those.

    Any suggestions

    Thanks

    supernova42

    (@supernova42)

    I’m having problems with templates too. I was using Safari then I tried my routine in Firefox and Chrome and it worked. So now I’m trying to work out what’s going on.

    supernova42

    (@supernova42)

    I had a few problems with the new woody ad snippits and so I stopped using it.

    You can create your own plugin or child theme and put your php there. You then call it with a shortcode. The advantage is that all your php is in one place and you can lose the woody ad plugin. I always try to minimise the number of plugins I use.

    Thread Starter supernova42

    (@supernova42)

    Okay Roland I followed your instructions
    I wanted to use the ‘pdb-record-default’ template so I copied it and named it ‘pdb-record-arcona’. I then copied the javascript code into the template file. The script went straight after the top closing ?> tag. In this new template file I changed the name of the parent to ‘tidal_area’ and the child to ‘tidal_location’. These are the names of my fields in PDB. I then uploaded my new template file to my templates folder.

    In Manage DataBase Files I have the two fields described above. I copied your sample State text into my tidal_area dropdown list. I then copied the sample city text into my tidal_location dropdown list.

    All was going well

    I inserted the following shortcode into one of my pages. The shortcode contains tidal_area and tidal_location.

    [pdb_record template=”arcona” fields=”username,boat_name,boat_model,sail_number,boat_owner,build_year,boat_length,berthed_at,tidal_area,tidal_location,tidal_days,state,city,latitude,longitude,registration,registration_no,radio_callsign,mmsi,website_address,brief_description,single_photo” record_id=1008]

    The parent dropdown field (tidal_area) contained the states as expected. I selected one of the states and when I went to the child dropdown field (tidal_location) it contained all the states and all the cities. It hadn’t restricted the list and basically its not working.

    Is there anything obvious I’ve missed out. If not is it possible that the template needs updating.

    Many thanks

    Thread Starter supernova42

    (@supernova42)

    This is how far I’ve got so far Roland
    What I need to know is how do I fill the array for the variable $tidal_location which is in a dropdown menu and how would I format it?

    [insert_php]
    $current_user = wp_get_current_user();
    $wp_username = $current_user->user_login;
    $user_id = Participants_Db::get_record_id_by_term(‘username’,$wp_username);
    $data = Participants_Db::get_participant($user_id);
    $tidal_area = $data[‘tidal_area’];
    $tidal_location = $data[‘tidal_location’];

    switch ($tidal_area) {
    case “UK Channel Islands”:
    // load array for Channel Islands
    break;
    case “UK England”:
    // load array for England
    break;
    case “UK Ireland”:
    // load array for Ireland
    break;
    default:
    echo ‘No Tidal Area Specified…’;
    }
    [/insert_php]

    Thread Starter supernova42

    (@supernova42)

    Okay no problem, will have to think of another solution.

    Thanks

    Thread Starter supernova42

    (@supernova42)

    I’m starting to get used to them now.

    Thanks

    Thread Starter supernova42

    (@supernova42)

    Works perfectly now Roland

    Thanks

    Thread Starter supernova42

    (@supernova42)

    Great I’ve just installed and tried it out and all seems good.

    Thanks

    Thread Starter supernova42

    (@supernova42)

    You don’t even need to access the Manage Database Fields as they seem to change while accessing PDB from the front end.

Viewing 15 replies - 61 through 75 (of 191 total)