bramwolf

Selectfield values from Form to Page fields randomly refusing to save

Recommended Posts

Hey Guys!

I ran into some really strange behavior when trying to save selected Selectfieldtype values

from a form to a select field in a page. I have three different dropdowns in this page, all

with different values and they randomly get saved en sometimes they don't. 

This is my setup:

Form                                                       Page:

Dropdown a:                                           Dropdown a:

-                                                               - V

-                                                               -

- V                                                            -

Dropdown b:                                           Dropdown b:

-                                                               - V

-                                                               -

- V                                                            -

Dropdown c:                                            Dropdown c:

-                                                               -V

-                                                               -

- V                                                            -

I have no idea what is causing this since it happens completely randomly,

does anybody have any ideas? Like, would it make more sense to only use

a text field on the page side to recieve the value? and if so, why?

Thanks in advance :)

Gr,

Bram

PS: In the screenshot you can see the three filters that pick up the dropdown values and

show the entries that are equal to the filter. And you can see the dropped values in the

submissions.

post-2187-0-36817100-1458124288_thumb.pn

Share this post


Link to post
Share on other sites

The select fields I was using on the page seemed to want to use a single non-spacing term of word as a identiefier object,

and the second as value. I only inserted one value per line, with breaks, and those were the ones that did not work.

I solved this by changing the fields on my page to text fields which contain the value supplied by the select field from the

form. And I think I could have doen it by inserting the value after for example: 1:=Value One.

Hope this might help somebody one day :)

Share this post


Link to post
Share on other sites

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.

  • Similar Content

    • By quickjeff
      Hi Guys, 
      I wanted to start this thread to see what others are doing to make sure they are compliant with GDPR.
      Basically, a ton of websites are built on WordPress and I am seeing tons of plugins being rolled out to help with cookie compliance etc. 
      Processwire however, doesn't have anything available. Also, if we are using FormBuilder, do we need an opt-in checkbox?
    • By chrizz
      I was wondering if there's an easy way to validate if a title is a valid value for a FieldtypeOptions field. 
      I have created a field with different status values where only a single value can be selected:
       
      1=done 2=planned 3=error Now I am going to update the page which includes this field which works fine so far - but: I I am using any other string than the defined options it stores a blank value. To avoid this I am trying to validate the input before. Something like getAllOptionsForField > in_array() etc would work but maybe there's a build-in method I am currently missing? 
      Long story short: how would you validate if the given string is a valid option for a field?
      as usual: Thanks
       
       
    • By louisstephens
      So I have been creating an internal web app over the last couple months, and am finally on the last piece of the puzzle, customizable forms. I thought I could just create a view basic forms and use a select option to let them select the form, and my template file could just output the form based on their selection. Easy enough. However, I have since ran into a slight head scratcher. Not all the forms are the same and they might vary greatly between each other. 
      Has anyone done something similar to this? In an ideal world, I would use form builder, but I really dont want them to have access to it. They are currently constrained to a few pages in the backend, which is why I was trying to think of a way for them to select a few fields (like from a page select), and then render the selections on the front end based on what was selected.
    • By louisstephens
      Does anyone know how to change the title of a select options to lower case? Right now, I have 3 options: "Management, Editor, Guest" (titles are uppercase in the backend), and I would like to change them to lower case in my template as I am adding them as a class name to span tags, ie "<span class="management"></span>".
      I will note, that I am using $level->title (the options) in a nested foreach loop, if this changes anything. Also, I thought I could use strtolower(), but it is just being "echo'd" in the source code.
    • By Sonia Margollé
      I have a problem and I don't understand. I have a profield table with different fields and a select field.
      I did like it's instructed and put "value=label".
      But when I'm trying to output the select field with var_dump (to debug),  it's indicated that the field is a string that contains the value.
      Why is it a string ?  when I try  myselectfield->value  or label or title I have an error saying I'm trying to get a property on a non-object ...
      Anyone ?