Calc element won't return placeholders via ajax

mygunfriday

Member
I have a form to list vehicles for sale.
An element called Suggested Title is a calc element with placeholders {tablename___elementname} for elements higher in the form. I have the calc element set to use ajax and create a suggested title for the user - rather than having them enter the same data twice

ex. 1999 Dodge Dakota SLT Pickup Truck - Is what I expect to see. Instead what I see is "0 9 97 0 4".

I'm not using _raw on any of the placeholders so I don't see why the values are showing. What's more, for Year and Trim, these are field elements with and number and text entered respectively - and the calc element returns 0 for each of these.

I've updated to the latest github and played with this for a few hours already - I'm out of idea's.

Any suggestions??

Screenshots of my settings and the relevant part of the form view. (In form view - arrows are the fields that should populate the calc element (circled))
suggested_title_fabrik_settings.pngsuggested_title_form_view.png
 
Try using _raw if your placeholder refers to the element which is a dropdown element or checkbox and see what you get.
 
Hi pkjoshi,
I think something would be very wrong if that worked, but I did try it just to see - same results. _raw should pull the table value, which is what I'm getting when not including the _raw.

I suspect the table value is a recent github glitch and will be fixed with a new update. I'm more stumped by the field elements always displaying zero. But I do need to fix both problems.

Thanks for the suggestion...
 
But palce-holders are supposed to return the table value that is the value stored in the DB. What value do you expect it to return?
 
As I understand it, the placeholder {tablename___elementname} should pull the Label for the record requested and the placeholder in the form {tablename___elementname_raw} should pull the Value (usually the id.)

I could be wrong, but I'm sure this is how I've used the placeholders in the past. Obviously it's not working as expected. But right now, it's pulling the Value for both forms of the placeholder - which is not what I expected or want.

My goal is to create a consistently formatted label for users - so the list of vehicles are always in the form:
[year] [make] [model] [trim] [vehicle type]
The record ID isn't much use to anyone but the server.
 
I want the calc element to display while the user fills the fields via ajax - I don't think this will work because the form hasn't been submitted yet. (Not sent to the database yet.)

This is meant to be a suggested title that the user can accept or change before submitting.

But the entered value's should be accessible through some variable in the form through ajax - any idea on how to access those variables? If the placeholder can access it, I should be able to as well...
 
hi all

Could we update from github and see if my latest commit fixes things for you all?

Cheers
Rob
 
60% fixed!
And that's what I thought would happen - the labels missing was a bug that would be fixed.

So I still have a problem with the field elements getting picked up by the ajax in the calc element.
I've attached pic of the form.

The arrows point to the field elements that should be reflected in the Suggested Title calc element - but what is returned is just a 0 for each. I thought I might have problems with the Dbase join elements, not the field elements....

Any suggestions?
 

Attachments

  • Vehicle ajax problem with fields.png
    Vehicle ajax problem with fields.png
    46.6 KB · Views: 278
I just checked the database and these are recorded to the database with the correct value. It's just the ajax calc that is missing the strings...
 
I'm guessing you were trying to get into the front end... The site is in development, so I put it offline when I'm not working. I have backend access for you noted in my account details if you need to put the site online.
 
I just found the site's link. I was looking at my account from the forum (there are some site access fields there). I've updated my sites link with current access credentials.
 
can you ensure that the account can actaully add vehicules, I get

<b>You need to update important information like phone & address in your<a href='/my-contact-info' target='_self' title='My Details'>My Details</a> Page before updating your Featured Vehicles. </br>This ensures any leads you get will be handled correctly and given your correct contact info.</b>

written in a field when i try to add one.

I then tried to edit my-contact-details - but it still wont let me add
 
Oiy! This seems complicated, but really, it's not...

Sorry Rob, Admins can't add records to that table. (You had me worried something was broken...)
You need to log in as a Member of the site.
I gave you a Test Member's credentials in a private conversation thread.
At least you did find the link (I should have given you that to keep it simpler.)
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top