Hi, i have created a form to collect data of “Unit Number”, “Street No.”, “Street Name”, “Suburb”, “Postcode”. I want to show those address data in FULL as a full street on a dynamic page. What is the more effective ways to make it happen?
Is there any way that to create a new field as “Full Address” then as me combined all those field’s content into the Full Address field. I also want to add “/” between the “Unit number” and “Street No.” if there is content in “Unit Number”.
regarding the context warning, since you are not using this variable, you can remove it from the function’s signature.
regarding the address format, you can use the item’s attributes to create all kinds of formats. use it to create the format you are aiming for.
Regarding the function warning, you can use:
“export function listings_beforeInsert(item)” instead of “export function listings_beforeInsert(item, context)” to reduce the warning.
Thx so much Idan, i can so new for the coding. Apprecaited ur help. I have remove the warning by what you said, but the fucntion doesn’t work still. I can see i am getting there.
What sure if i am on the right track. Let me tell you guys what i have done so far.
I want to make the address look like
1 Thomas Court, Doncaster, VIC 3128
which means=
AddressNumber AddressStreet, AddressSuburb, AddressState AddressPostcode
try manually adding the column for full address to the listings table, and then save your work.
As it seems, your beforeInsert function should work as you wanted.