Upsert Form Plugin Issues - User and Date

Status
Not open for further replies.

degarrin

Member
Hello, I've been trying out the upsert plugin for the first time, and for the most part I have been able to get it to work beautifully. However, there are two fields that I cannot seem to get to update on my new form no matter what I try. I have looked through the forum at length and gone through the wiki entries for the upsert plugin AND php form plugin/common tasks for help. I could use some assistance to figure out what I am doing wrong.

Main Form - Grievance (fab_grievance_form)
Secondary Form - Grievance Investigation (fab_grievance_investigation)

Elements are being inserted/updated from 'fab_grievance_form' into 'fab_grievance_investigation' and there are matching elements on both so that mapped fields have somewhere to go.

Element types that are working: dbjoin, field, textarea, dropdown

Element types that are not working: date and user

Date: 'fab_grievance_form___grievance_filing_date'
I tried {fab_grievance_form___filing_date}. When that didn't work, I tried {fab_grievance_form___filing_date_raw}. All I get are zeroes in the database and blanks in the form field itself. The elements on both forms have the tz set to UTC.

User: 'fab_grievance_form___grievance_form_filer_id'
I tried a variety of things on this one but no luck. I never got an error message, but depending on what I tried, just left it either the placeholder, blank, 0, or NULL (in the database itself). I guess the first question is probably, can you even use the upsert plugin with the user field? Since the user plugin itself is pulling from the core user table, which is mapped to multiple other tables, right? I need the filer information on the new form, but it could be just a plain field there if the mapping rules would allow it (I tried and got an error, but perhaps I didn't have it set correctly). I also tried to do it with the php form plugin instead but I didn't have any better luck, although my experience with eval'd code is very basic so far.

Any advice? I would greatly appreciate it, as I am ready to pull out my hair at this point...

Thank You!
Angela

Joomla: 3.5.1
Fabrik: 3.4.3
PHP: 5.6.22
 
A user element works if I use the raw placeholder.

http://screencast.com/t/qmUtLLGt240

In that video, you can see my upsert settings, I submit the form (my debugger then pops up, where I was stepping through the code, ignore that), then you see the raw table (in Navicat) for the row I'm updating (the first one), and I refresh that data, and you can see the correct values for date and user.

-- hugh
 
Alright, I got them both to work. Crazy enough, the user was the easier of the two. My date element just did not want to upsert. The only way I finally got the date to record in the form and database was by deleting/recreating the elements, appending 'raw' to the placeholder, and setting the TZ to local (I tested at each step, and nope, only worked with all three changes). Weird. But this works alright for me even though I know it is not the standard, so I'm good.

Thank you Hugh, for the screencast and taking the time to look at my issue. A big help as always!!

Angela
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top