Jump to content

Gary Austin

  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Gary Austin's Achievements

Jr. Member

Jr. Member (3/6)



  1. The "spaces" are actually \n\n newline characters which get displayed as spaces. textContent: " \n\n King of the English" textContent: " \n\n \n\n \n\n \n\n Notorious cannibal" Are you using a new editor, copy/paste method, browser or type of machine in the past 3 weeks?
  2. Don't know if this helps, and sorry I don't have time to dig into exactly what you are doing, but if you are on the url for one of these subpages with the servicearea template then the data for that page is in $page without you doing anything in the servicearea template. The $page variable contains all the field data for the subpage (like "carpenter") that you are on.
  3. I'm just a beginner at ProcessWire, so not much help as I can't figure out your code/structure at a quick glance as it is structured so different than the way I'm using PW. On your first issue with the flag images, you really need to use the code with ul/li that flydev showed you. Going with a javascript select is really overkill for what you are trying to do as you do not really need a select at all. Just a ul with li's containing anchor tags and <img src="image url"> tag inserted before the $language-title piece. Then the the css to make it look like a select (which may work with the classes he provided, but I don't know that piece of code and where the css is coming from).
  4. Not sure I fully understand what your asking. If it is basic template/pages then the template is passed the $page variable with all the fields and you just use it like you did in the 2nd line $page->phone. You don't load the page like you are showing in the first line as that will always get what ever /start/section1 is.
  5. I don't believe background images for <option> work across all browsers, but it has been awhile since I messed with it. This is not PHP or Processwire, but basic HTML. You'll need to build your own select (like flydev's first example using <li>'s) or use a jquery or other type of javascript plugin.
  6. Yes but in his example he was using <li>'s not <select><option>
  7. I don't believe you can have image tags inside an <option> tag. I think you will need to use a replacement jquery plugin like select2, or create your own select using li's. Google "image in option select" and you will find suggestions on how to do this.
  8. So you should double check the url being used for your submit and probably post it here. What response code are you getting from the server?
  9. When you first started this thread you were using Javascript ajax to send your post request... So someone showed how to use $config->ajax to check for request. In your latest example you are using a normal html form submit. To test for submit in that case you would use if ($input->post->submit). Javascript ajax and normal html form submit are sent in two different ways to server.
  10. Does your mysql error log show anything at the time the error occurs?
  11. Here is the setup page for a note showing one field under a category. Each can be repeated.
  12. As far as rendering, for PW side I just generate form html using inputfield rendering as I loop thru the json (converted to PHP array) and generate the form. I use this technique to generate a version of the form with the ability for the user to modify the option selects and add an extra field or two. As I said I merge those in with the "fixed" data for each type of note. I also use the same json form data to generate the form and organize the display of note data in javascript on the client side as this is actually for a web app.
  13. I started with a big multi-level repeater field to allow adding an input, specifying its name and picking type (text,select,multiselect) and then adding options if allowed. I then saved this as a new template by writing json to a file with a name keyed to type of note. When the user selects to start a note I pull the corresponding json file and generated the form. I had planned to offer some option with repeater fields to users down the road for generating their own, but right now it is too difficult as notes have 30 or more input select fields with lots of options for each note. For now I allow a few customization options for each user that gets stored also in a json/text field and then "merge" with an existing note as I generate the final form. You could certainly just write the note html versus intermediate structure, but I needed an easy way to allow the user to change select options and the json structure allows me to match the original structure with the user customization at final generation.
  14. So I have a bunch of templates that define fields for different types of "notes". I put them under a parent page and then use a Page Reference field on the parent page of the templates. The user can select from the templates using a radio box (I allow multiple options, but you could use other input options to just get one). I later then process their templates as needed by reading in the template page and processing it. To add a new template I just add a page and it is then available without having to edit the option box. I may also use a loop on the children of the template parent with my own code to generate the select options. This would allow the templates having an extra value to indicate which group of user can see them. In this case a page reference field would not work easily (that I know of) as I want to filter the templates based on the "type" of user or some other property the user has.
  15. If you have not googled "404 only home page working processwire" there are many threads discussing various issues, most involve .htaccess not working and sites in subdirectories.
  • Create New...