I have a form that when a change is made to the data I want the user to only be able to "Copy as New" to save a new instance of the form.
If I toggle the save button to hidden then it doesn't show up in the "New" form (can't add a new form).
My thought is to hide the save button with javascript, but I can't seem to figure out how to access that element. I am adding javascript to an element on load.
This works to access another field:
var market = Fabrik.getBlock('form_1').elements.get('cpm___market');
market.hide();
var saveButton = Fabrik.getBlock('form_1').elements.get('Submit');
saveButton.hide();
Inspecting the Save button element:
<button type="submit" class="btn btn-primary button save" name="Submit">Save</button>
Is the elements.get using the id attribute and that is why I can't access the Submit? If so, how can I access it?
Also, any better thoughts on how to accomplish this?
Thanks.
If I toggle the save button to hidden then it doesn't show up in the "New" form (can't add a new form).
My thought is to hide the save button with javascript, but I can't seem to figure out how to access that element. I am adding javascript to an element on load.
This works to access another field:
var market = Fabrik.getBlock('form_1').elements.get('cpm___market');
market.hide();
var saveButton = Fabrik.getBlock('form_1').elements.get('Submit');
saveButton.hide();
Inspecting the Save button element:
<button type="submit" class="btn btn-primary button save" name="Submit">Save</button>
Is the elements.get using the id attribute and that is why I can't access the Submit? If so, how can I access it?
Also, any better thoughts on how to accomplish this?
Thanks.